I namespaced my whole package successfully but I can not get namespaced migrations to work. In the autoload_classmap.php the migration classes are nicely namespaced, but the Migrator is not looking for the migration classes within the namespace. How to get the migrator to search for the migrations within the 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 is logical since the UsersTable is in the Atomend\Aeuser
namespace.
Issuing the migration
php artisan migrate --bench="atomend/aeuser"`
So to be clear, when losing the namespace everything works fine and dandy.