You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
381 B
12 lines
381 B
#!/bin/bash |
|
cd /var/www/html |
|
php artisan tinker --execute " |
|
\$token = App\Models\ApiToken::create([ |
|
'name' => 'ai-test-token', |
|
'token' => 'ai-test-' . bin2hex(random_bytes(16)), |
|
'owner_type' => 'user', |
|
'owner_identifier' => 'rbsetiawan', |
|
'scopes' => json_encode(['admin']), |
|
]); |
|
echo 'TOKEN=' . \$token->token . PHP_EOL; |
|
" 2>&1 | grep -v Deprecated | grep TOKEN
|
|
|