The schema builder does not have the ability to create views so you have to write the sql necessary to create them manually in your migration classes.
Just create a migration like usual then delete everything in the up and down methods and replace it with the queries need to create and drop the view.
DB::statement('CREATE VIEW ...');
DB::statement('DROP VIEW ...');
Keep in mind this will only work if you are using mysql.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.