PHP code example of luilliarcec / laravel-user-commands
1. Go to this page and download the library: Download luilliarcec/laravel-user-commands library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
luilliarcec / laravel-user-commands example snippets
namespace App\Commands;
use Luilliarcec\UserCommands\Commands\CreateNewUserCommand as CreateNewUserCommandBase;
class CreateNewUserCommand extends CreateNewUserCommandBase
{
protected function prepareForSave(): array
{
return $this->merge([
'password' => Hash::make($this->data['password']),
'username' => Username::make($this->data['name']),
]);
}
}