#!/bin/bash cd /var/www/html php artisan tinker --execute " \$token = App\Models\ApiToken::whereNull('revoked_at')->latest()->first(); if (\$token) { echo 'token=' . \$token->token . PHP_EOL; echo 'owner=' . \$token->owner_identifier . PHP_EOL; } else { echo 'no active token found' . PHP_EOL; } " 2>&1 | grep -v Deprecated