環境
・Laravel10
・Ubuntu22.04
コマンド
キャッシュ削除コマンド
Laravelプロジェクト配下で
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear
マイグレーションファイル新規作成
php artisan make:migration create_posts_table --create=posts
自動起動確認
Apacheなどで使用
systemctl list-unit-files -t service
userをwww-data(apache)グループに追加する
sudo usermod -a -G www-data user
コード
例外処理を発生させる
tryの中に記述
throw new Exception('例外処理です');