chrishalbert / laravel-nomadic

A toolkit of enhancements to laravel's migrations.
MIT License
31 stars 5 forks source link

Exception thrown on creating migrations to create tables #26

Open asaad-modus opened 5 years ago

asaad-modus commented 5 years ago

Command

php artisan make:migration CreateNewTable

Will throw the following exception

   Illuminate\Contracts\Filesystem\FileNotFoundException  : File does not exist at path /m360/c360/webroot/vendor/chrishalbert/laravel-nomadic/src/stubs/create.stub

  at /m360/c360/webroot/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:41
    37|         if ($this->isFile($path)) {
    38|             return $lock ? $this->sharedGet($path) : file_get_contents($path);
    39|         }
    40| 
  > 41|         throw new FileNotFoundException("File does not exist at path {$path}");
    42|     }
    43| 
    44|     /**
    45|      * Get contents of a file with shared access.

  Exception trace:

  1   Illuminate\Filesystem\Filesystem::get("/m360/c360/webroot/vendor/chrishalbert/laravel-nomadic/src/stubs/create.stub")
      /m360/c360/webroot/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php:103

  2   Illuminate\Database\Migrations\MigrationCreator::getStub("new_table")
      /m360/c360/webroot/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php:55

It seems that this stub file is missing laravel-nomadic/src/stubs/create.stub

twoodard-edr commented 2 years ago

FWIW I found that if I copied blank.stub to create.stub and update.stub (within the same directory) the exception did not occur and make:migration seems to run properly