Search

Showing 7 of 1,697 result(s)

/blog/2018/04/11/laravel-5-retrieving-and-removing-an-element-from-an-array-with-pull

The pull helper method is similar to the get method in that it will return a value for the given $key in the $array (or the $default , if it is specified and the $key does not exists). The difference is that the pull method will remove the item it...

/blog/2018/04/14/laravel-5-accessing-and-manipulating-session-data-with-session

The session function can be used to resolve the "\Illuminate\Session\SessionManager" instance from the service container, retrieve session values, and even set new session values. These different behaviors are controlled by the types, and number,...

/blog/2018/04/14/laravel-5-accessing-session-input-data-with-old

The old helper function is used to retrieve an old input item. It is a shortcut to calling the "Illuminate\Http\Request::old" instance method. It accepts a $key argument and a $default argument. They $key should be the name of the input item to...

/blog/2018/04/14/laravel-5-creating-eloquent-models-for-testing-with-factory

The factory function is used to create Eloquent models, and is generally used when testing an application to generate sample data.The signature of the factory function is:The factory method can generally take one of four forms:

/blog/2018/04/14/laravel-5-generating-an-html-field-for-http-verbs-with-method_field

The method_field helper function is a simple function that returns a new instance of "Illuminate\Support\HtmlString" The contents of the HtmlString instance is a hidden HTML input field with the name _method and the a value of $method .The...

/blog/2018/04/14/laravel-5-generating-paths-relative-to-the-public-directory-with-public_path

The public_path will return the path to the public directory. It can also be used to construct paths relative to the public directory if a $path is supplied.The signature of the public_path function is:The following examples will assume that the...

/blog/2018/04/14/laravel-5-generating-paths-relative-to-the-resource-directory-with-resource_path

The resource_path helper function can be used to resolve the path to the resource directory, or to sub-directory or file contained within the resources directory.The signature of the resource_path function is:The following example assume that the...