Showing 10 of 1,204 results.

Laravel Artisan Tinker: The wtf Command

…ay more lines of the stack trace than simply issuing the wtf command alone. Alternatively, the -v option can be used to display the entire back trace. The following example session throws an exception and uses the wtf command to view the back...

Laravel Artisan Generator Command: The make:seeder Command

…eder extends Seeder 6 { 7 /** 8 * Run the database seeds. 9 * 10 * @return void 11 */ 12 public function run ( ) 13 { 14 // 15 } 16 } The make:seeder command is also capable of generated seeder classes within nested directories. Accomplish this...

Laravel 5 Collections: Sorting a Collection With sort

The sort method is used to sort the collection. If no $callback is provided, the collection will be sorted using a case-insensitive "natural order" algorithm. An optional $callback can be supplied to customize the comparison that is used when...

Laravel 5: Logging Informative Messages With info

…info ( ' This is a log message ' , $ context ) ; 9 10 // A log message where the context is an array of objects. 11 info ( ' This is another log message ' , [ ( object ) $ context ] ) ; The above code would produce results similar to the...