How to make Laravel migrator work with namespaced migrations? -


i namespaced whole package can not namespaced migrations work. in autoload_classmap.php migration classes nicely namespaced, migrator not looking migration classes within namespace. how migrator search migrations within namespace?

the migration file

<?php namespace atomend\aeuser;  use illuminate\database\schema\blueprint; use illuminate\database\migrations\migration; use schema, user;  class userstable extends migration {     public function up() {       schema::create("users", function(blueprint $table) {           $table             ->increments("id"); 

autoload_classmap.php

'atomend\\aeuser\\userstable' => $basedir . '/src/migrations/2014_04_21_184359_users_table.php', 

terminal error

php fatal error:  class 'userstable' not found in 

this logical since userstable in atomend\aeuser namespace.

issuing migration

php artisan migrate --bench="atomend/aeuser"` 

so clear, when losing namespace works fine , dandy.

laravel migrator doesn't play nice namespaced migrations. best bet in case subclass , substitute migrator class, christopher pitt explains in blog post: https://medium.com/laravel-4/6e75f99cdb0.


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -