Showing 10 of 2,044 results.

Fluent and Closures | Laravel 5 Fluent API: The Public API

If we look at the following code example, one might be tempted to say that the value of $message would be Hello, world! , but that would be incorrect: 1 $ testObject = new stdClass ; 2 $ testObject -> method = function ( ) { 3 return ' Hello,...

Example Use | Laravel 5 Fluent API: The Public API

The following method calls are equivalent: 1 $ testObject = new stdClass ; 2 $ testObject -> method = function ( ) { 3 return ' Hello, world! ' ; 4 } ; 5 6 $ fluent = new Fluent ( $ testObject ) ; 7 8 // Using the `getAttributes` method. 9 $...

Laravel Artisan Generator Command: The make:event Command

…h will be the name of the new class. The generated classes by default will extend the App\Events\Event class (the actual namespace may be different depending on whether or not the applications root namespace has been changed). The following...

Laravel Artisan Generator Command: The make:policy Command

…used to generate to policy classes. It requires a name to be provided; this name will be used as the file name as well as the newly generated class name. Policy classes are stored within the app/Policies directory. The following example...

Laravel Artisan General Command: The serve Command

The serve command is used to run the application using the PHP development server. This command is generally used for development and testing purposes. The serve command accepts two optional options: host can be used to change the address of the...

setCompilationTarget | Blade Compiler

Sets the internal compilation target. Argument Description $compilationTarget The compilation target. 1 <?php 2 3 use Stillat \ BladeParser \ Compiler \ CompilationTarget ; 4 use Stillat \ BladeParser \ Compiler \ Compiler ; 5 6 public function...