php artisan migrate:make create_mytable fails: "migrate:make" is not defined

Stefan Bogdanescu

Founder & Senior Architect · 2026-06-29

Laravel Company
Title: "php artisan migrate:make" Command Error in Laravel 5 - A Comprehensive Guide to Understanding and Solving the Issue Introduction: As a Senior Developer, you may have encountered an issue when running the command `php artisan migrate:make create_mytable` in your Laravel 5 application. In this blog post, we will explore why this error occurs, explain the correct approach for creating new tables and migrations according to the newest Laravel version, and provide helpful links from https://laravelcompany.com that you can refer to while working with Laravel migration commands. 1. Understanding the Error: In Laravel 5, the `migrate:make` command is not defined by default as it has been deprecated in favor of the newer `make:migration` command. When running the old command, you encounter the error message stating that the command is not available anymore. 2. The Correct Approach for Creating Migrations in Laravel 5: To create new migrations and define their tables, follow these steps: - Run the `make:migration` command at the root of your Laravel project with a suitable name for the migration file. For instance, run `php artisan make:migration create_mytable`. This will generate a new file in the database/migrations folder, named as per your given migration name (create_mytable_1_example_table). - Inside this newly created migration file, you can define your table structure using the Laravel query builder or Eloquent model. For example: `Schema::create('my_table', function(Blueprint $table) { $table->increments('id'); // Define additional fields and constraints as needed });` 3. Applying Migrations with the New Commands: Once you have created your migration file, you can apply it using the following commands: - Run `php artisan migrate:install`, which will create a table to store all your migrations in the database, if not already present. - Then, run `php artisan migrate` to execute all pending migrations for your application. 4. Resetting Migrations: Now, you may need to reset your application's entire migration history at some point. You can use the `migrate:reset` command that removes all existing tables and applies all the pending migrations. Always remember to back up your database before running this command. 5. Understanding Laravel Migration Commands in Laravel 5.x: If you want to get a more detailed explanation of available migration commands, refer to the official documentation on Laravel Company website: https://laravel.com/docs/5.x/migrations#available-commands. This will provide you with information about migration status, rollback options, and other useful tools for managing your database's structure. Conclusion: In this comprehensive guide, we have explored the issue of `php artisan migrate:make` not working in Laravel 5 due to its deprecation, explained how to create new migrations using the correct approach, and provided links to additional resources from Laravel Company for further learning.