06.10.2016 Views

laravel-5

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Helper Functions 388<br />

1 $value = config('app.timezone');<br />

2<br />

3 $value = config('app.timezone', $default);<br />

The config helper may also be used to set configuration variables at runtime by passing an array<br />

of key / value pairs:<br />

1 config(['app.debug' => true]);<br />

csrf_field() {#collection-method}<br />

The csrf_field function generates an HTML hidden input field containing the value of the CSRF<br />

token. For example, using Blade syntax:<br />

1 {{ csrf_field() }}<br />

csrf_token() {#collection-method}<br />

The csrf_token function retrieves the value of the current CSRF token:<br />

1 $token = csrf_token();<br />

dd() {#collection-method}<br />

The dd function dumps the given variable and ends execution of the script:<br />

1 dd($value);<br />

If you do not want to halt the execution of your script, use the dump function instead:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!