Showing 10 of 1,278 results.

Extending Laravel's Paginator | Laravel Paginator Pretty URLs

The class we want to extend is Illuminate\Paginator\Paginator . It has a function named getUrl($page) ; this is responsible for creating the URLs that the paginator uses when rendering the HTML links. Because of this fact, we should figure out a...

Creating the Route | Laravel Paginator Pretty URLs

…Paginator :: getPageName ( ) . ' /{page} ' , ' UsersController@getShowResults ' ) ; 4 ... The Paginator::getPageName() will just add the default pagination page name in our route, which is page by default. The {page} part is a placeholder and...

Additional Storage Methods | Laravel 5 Facades

The Storage facade defines a few extra helper methods, both are to help make testing filesystem components within your Laravel application easier. Both of these testing methods will replace the storage disk with a local storage disk; this means...

Handling Specific Numbers | Laravel String Pluralization

…count books. ' , 1 ) ; 12 13 // There are 2 books. 14 trans_choice ( ' {0} Sorry! No books here. 15 |There is one book. 16 |There are :count books. ' , 2 ) ; It can be seen in the last call to the trans_choice function in the above code example...

Specifying the Locale | Laravel 5: String Translation Public API

Like with many of the translator's public methods, we can specify the locale when calling the choice method via an argument to the $locale parameter. By default, Laravel will use the default configured locale when you invoke the choice method. We...