PHP code example of skulich / laravel-user-token-management-cli
1. Go to this page and download the library: Download skulich/laravel-user-token-management-cli 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/ */
skulich / laravel-user-token-management-cli example snippets
namespace App\Providers;
class AppServiceProvider extends ServiceProvider
{
public function boot(): void
{
app()->bind('\App\Models\User', fn () => resolve('\App\User'));
}
}
shell
# create a new user
php artisan user:create
# delete a user
php artisan user:delete
# list users
php artisan user:list