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 command is a shortcut for docker compose exec and can accept additional options that you pass to it.
This command requires the containers to already be running (start them with spin up). If your containers are not running, use spin run instead.