Showing 10 of 1,280 results.

Laravel Paginator Pretty URLs

I recently published a series of articles about creating a custom pagination view where users can enter the page number in a text box. On the second post I received a comment asking how to do pretty URLs with Laravel's paginator. Well here we go,...

Laravel 5: Getting the Last Element of an Array With last

…ifth ' , 4 ' sixth ' 5 ] ; We can get the last element (without removing it) like so: 1 $ lastElement = last ( $ anotherArray ) ; At this point, the $lastElement would have the value of sixth . The following function calls are equivalent: 1 //...

Laravel Artisan General Command: The serve Command

…3 4 # Change the development server address. 5 php artisan serve --host = homestead.app 6 7 # Change the development server port. 8 php artisan serve --port = 8080 9 10 # Change the development server address and port. 11 php artisan serve --host...

Laravel 5: Logging Informative Messages With info

The info helper will write an information entry into Laravel's log files. It allows a $message to be set, as well as an optional $context (which is an array of data). While the $context must be an array, the actual elements of the array do not...

Laravel 5.5 String Helper Function: studly

Studly caps is a way of formatting text with capital letters, according to some pattern. Laravel's pattern is to remove the following word separators and capitalize the first letter of each word it finds (while not affecting the case of any other...

Laravel URL Helper Function: elixir

…he path for and the $buildDirectory to look in. By default, the $buildDirectory is set to build . The build directory is relative to the applications public directory ( app/public ). Assuming the following simple gulpfile: 1 var elixir = require...