mercredi 29 juin 2016

Laravel 5 error can't create new models

For some reason I get this error. Using my new model logospinner.php. I't is located in a app/models, all the old models are working but not this new one.

FatalErrorException in Handler.php line 25:
Uncaught TypeError: Argument 1 passed to App\Exceptions\Handler::report() must be an instance of Exception, instance of Error given, called in /home/vagrant/Code/smr/vendor/compiled.php on line 1817 and defined in /home/vagrant/Code/smr/app/Exceptions/Handler.php:25
Stack trace:
#0 /home/vagrant/Code/smr/vendor/compiled.php(1817): App\Exceptions\Handler->report(Object(Error))
#1 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(Error))
#2 {main}
thrown

Here is the call in the controller.

use Logospinner;    
public function logospinner() {
       $data = Logospinner::get();
}

And here is the model

<?php namespace App;

class Logospinner extends Eloquent {
    protected $table = 'logospinner';
    protected $guarded = array("id");
    protected $hidden = array();

}



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/298nlx9
via IFTTT

Aucun commentaire:

Enregistrer un commentaire