re migrate laravel
Try: composer dump-autoload php artisan config:cache If not working also try: php artisan migrate:refresh.
re migrate laravel
Try: composer dump-autoload php artisan config:cache If not working also try: php artisan migrate:refresh.
laravel create trigger migration
<?php use Illuminate\Database\Migrations\Migration; class CreateTrigger extends Migration { public function up() { DB::unprepared(' CREATE TRIGGER tr_after_main_insert AFTER INSERT ON `main` FOR EACH ROW BEGIN INSERT INTO `test`(`new_id`, `type`, `value`, `created_at`) VALUES (NEW.id, NEW.type, 1, NOW()); END '); } public function down() { DB::unprepared('DROP TRIGGER `tr_after_main_insert`'); } }
artisan refresh
Try this command it works for me php artisan migrate:fresh However, be careful! This command will drop all data from your DB:
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us