#!/bin/bash
cd /var/www/html
php artisan tinker --execute "
\$row = DB::table('api_tokens')->latest()->first();
if (\$row) {
echo json_encode((array)\$row, JSON_PRETTY_PRINT) . PHP_EOL;
} else {
echo 'no token' . PHP_EOL;
}
" 2>&1 | grep -v Deprecated