doumengxue7371 2013-11-17 15:36
浏览 47
已采纳

Laravel 4在dump-autoload之后返回FatalErrorException

thanks for read. I was creating a model in Laravel 4 while run dump-autoload with Artisan and everything stop working.

I was searching a lot how to fix this problem but i cant find any solution.

I was uninstall Laravel and install again, the problem solved but when i repeat the process, the problem appears again.

Sorry about my english.

The error:

Symfony \ Component \ Debug \ Exception \ FatalErrorException Call to undefined method Illuminate\Routing\Router::deleted()

The line:

\vendor\laravel\framework\src\Illuminate\Routing\Router.php:281

$this->{$route['verb']}($route['uri'], $action);

My model:

<?php
use LaravelBook\Ardent\Ardent;
class Programacion extends Ardent {

  /**
   * Ardent validation rules
   */
  public static $rules = array(
    'autor' => 'required',
   'etiquetas' => 'required',
    'sala_id' => 'required|integer',
    'genero_id' => 'required|integer',
    'teatro_id' => 'required|integer',
    'img_portada' => 'required',
    'img_miniatura' => 'required',
    'estado' => 'required|integer',
    'referencia' => 'required'
  );

}

My method in controller:

/**
 * Store a newly created resource in storage.
 *
 * @return Response
 */
public function postCreate()
{
    $programacion = Programacion::create(
        Input::all()
    );
         //$post = Input::all();
    }
  • 写回答

1条回答 默认 最新

  • dougou5844 2013-11-17 15:45
    关注

    I hit this problem yesterday. My problem was that a Controller class had the same name that a Model class. I renamed the Controller class, ran php artisan dump-autoload and it worked again.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 在获取boss直聘的聊天的时候只能获取到前40条聊天数据
  • ¥20 关于URL获取的参数,无法执行二选一查询
  • ¥15 液位控制,当液位超过高限时常开触点59闭合,直到液位低于低限时,断开
  • ¥15 marlin编译错误,如何解决?
  • ¥15 有偿四位数,节约算法和扫描算法
  • ¥15 VUE项目怎么运行,系统打不开
  • ¥50 pointpillars等目标检测算法怎么融合注意力机制
  • ¥20 Vs code Mac系统 PHP Debug调试环境配置
  • ¥60 大一项目课,微信小程序
  • ¥15 求视频摘要youtube和ovp数据集