spin exec [OPTIONS] SERVICE COMMAND
spin exec php php artisan migrate
The above command runs php artisan migrate inside of the php service (this is why "php" is repeated twice).
This will only run on machines that have spin installed on it. This means if you installed spin via "composer" or "yarn", this command will not execute.