php - Laravel 5 error can't create new models -


for reason error. using new model logospinner.php. i't located in app/models, old models working not new one.

fatalerrorexception in handler.php line 25: uncaught typeerror: argument 1 passed app\exceptions\handler::report() must instance of exception, instance of error given, called in /home/vagrant/code/smr/vendor/compiled.php on line 1817 , 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 call in controller.

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

and here model

<?php namespace app;  class logospinner extends eloquent {     protected $table = 'logospinner';     protected $guarded = array("id");     protected $hidden = array();  } 

i found solution. when new model created, path must added

\vendor\composer\autoload_classmap.php:  return array(     'logospinner' => $basedir . '/app/models/logospinner.php', } 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -