Laravel Request and Path

//$url = 'http://rexlocal.com:8000/admin/category?id=5';

$request->path();
// admin/category

$request->url();
// http://rexlocal.com:8000/admin/category

$request->fullUrl();
// http://rexlocal.com:8000/admin/category?id=5

\Request::getRequestUri();
// /admin/category?id=5

\Request::path();
// admin/category

$request->is('admin/*');
// true

$request->input('id');
// 5

$request->input('name', 'Sally');
// Sally

$input = $request->only(['username', 'password']);