mardi 4 août 2015

ReflectionException - Class name does not exist in Laravel 5.0

I have a little problem trying to seed my comments table. I'm 100% sure that I have the Class CommentTableSeeder.php in my /database/seeds directory.


CommentTableSeeder.php

<?php

use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;

class CommentTableSeeder extends Seeder {

    public function run()
    {
        DB::table('comments')->delete();

        Comment::create(array(
            'author' => 'Chris Sevilleja',
            'text' => 'Look I am a test comment.'
        ));

        Comment::create(array(
            'author' => 'Nick Cerminara',
            'text' => 'This is going to be super crazy.'
        ));

        Comment::create(array(
            'author' => 'Holly Lloyd',
            'text' => 'I am a master of Laravel and Angular.'
        ));
    }

}


Then when I run : php artisan db:seed

I kept getting

enter image description here

I've also try running composer update and run : php artisan db:seed - still get the same result.

Any hints / help will be much appreciated !



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire