Showing 10 of 1,322 results.

se_random_id Tag

…generates an ID that is 16 characters long. Generated IDs always begin with the el prefix (which is factored into the final length). The minimum length this tag can generate is four characters. 1 {{ the_loop }} 2 {{ _id = { se_random_id } / }} 3...

Specifying a Default Value | Laravel 4: Getting User Input

…t and last name. 6 $ firstName = Input :: get ( ' firstName ' , ' John ' ) ; 7 $ lastName = Input :: get ( ' lastName ' , ' Doe ' ) ; 8 } ) ; What the above code will do is first look to see if the user has entered their first and last name. If...

Laravel Artisan View Command: The view:clear Command

The view:clear command is used to quickly remove all of the compiled view files from the application. This is done by removing all the files from the configured view storage directory (by default this is the storage/framework/views/ directory)....

Laravel: Implementing a CRYPT_SHA256 Hasher

…shedValue , array $ options = [ ] ) 101 { 102 if ( ! isset ( $ options [ ' salt ' ] ) && ! isset ( $ options [ ' rounds ' ] ) ) { 103 return false ; 104 } 105 106 $ hashParts = $ this -> getHashInformation ( $ hashedValue ) ; 107 108 // If the...

Laravel Artisan Key Command: The key:generate Command

…scenarios where it is beneficial, if not absolutely critical to do so. When these scenarios arise, the problems can be overcome by decrypting the old data and reapplying the encryption using the new encryption key. The following example will...

Laravel Artisan Generator Command: The make:request Command

…* @return array 23 */ 24 public function rules ( ) 25 { 26 return [ 27 // 28 ] ; 29 } 30 } This command will not overwrite any existing form request validation request classes that have the same name. An error stating Request already exists! will...

Laravel Artisan Generator Command: The make:command Command

The make:command command can be used to generate a new command class. The class will be created in the app/Console/Commands directory. The command requires a name argument to be supplied. This name will be the name of the newly generated command...