View::share('user', $user);
Makes $user available to all views.
URI::segment(1);
First segement uf an URL (eg. site.com/de/hello = de).
Config::get('file.var')
Access config var/array.
Request::server('http_user_agent')
Returns header fields.
return Redirect::to('admin/view');
Redirect to URL admin/view.
Config::set('application.language', $lang);
Set application langague
Session::put('name', 'content');
Store sessions/cokies.
Hash::make($pass);
Generate a hashed string.
Hash::check('string', $user->password)
Checks string against field. Returns true/false.
Str::slug($str, $separator = '-')
Generate URL-safe strings.
Route::get('login','login@form');
route '/login', uses controller login, method form.
Route::get();
, Route::post();
, Route::any();
Requesting methods.
if(Request::ajax())
Returns true if AJAX request.
return Response::json($data);
Responses $data as JSON-String.
return View::make('home.index');
Returns view from folder home, file index.
Input::get('name');
get requests
e($var)
escape $var.
@yield('content')
Section content, available via @section
URL::current();
Current URL, including language. w/o query string.
URL::full();
Full URL w/ query string.
URL::to_asset('img/test.jpg')
Link file in public folder. Echos full URL.
@if(Request::env() == 'local')
Check if environnement = local.