doumu2172 2014-02-01 14:48 采纳率: 0%
浏览 131

在Composer更新后,Laravel应用程序无法启动

After updating composer using composer update, my application now fails to start.

Result of php artisan -V:

Laravel Framework version 4.1.19

Error message:

ErrorException

Route [admin.profile.index] not defined. (View: /var/www/laravel/app/views/back_end/menu.blade.php) (View: /var/www/laravel/app/views/back_end/menu.blade.php) (View: /var/www/laravel/app/views/back_end/menu.blade.php)


ErrorException

Route [admin.profile.update] not defined. (View: /var/www/laravel/app/views/back_end/layouts/profile.blade.php)

My Route:

Route::get('login', array('as'=>'login', function()
{
    return View::make('back_end.login');
}));
Route::group(array('before' => 'auth'), function()
{
  Route::resource('admin/profile' , 'ProfileController' , array('as'=>'profile' , 'before'=>'csrf'));
});

composer.json content:

{
        "name": "laravel/laravel",
        "description": "The Laravel Framework.",
        "keywords": ["framework", "laravel"],
        "license": "MIT",
        "require": {
                "laravel/framework": "4.1.*",
                "way/generators": "dev-master"
        },
        "autoload": {
                "classmap": [
                        "app/commands",
                        "app/controllers",
                        "app/models",
                        "app/database/migrations",
                        "app/database/seeds",
                        "app/tests/TestCase.php"
                ]
        },
        "scripts": {
                "post-install-cmd": [
                        "php artisan clear-compiled",
                        "php artisan optimize"
                ],
                "post-update-cmd": [
                        "php artisan clear-compiled",
                        "php artisan optimize"
                ],
                "post-create-project-cmd": [
                        "php artisan key:generate"
                ]
        },
        "config": {
                "preferred-install": "dist"
        },
        "minimum-stability": "stable"
}

ProfileController:

class ProfileController extends \BaseController {

    public $layout = 'back_end.layouts.main';
    public function index()
    {
        $profiles = Auth::user();
        return  View::make('back_end.layouts.profile')->with('profile', $profiles);
    }
}

Before the update, my application worked correctly and I had no problems.

  • 写回答

1条回答 默认 最新

  • dongting7352 2014-02-01 22:07
    关注

    Of course - with composer update, you were updating packages and broke some of your code due to changes with updates. Composer update is reading from the composer.json file. You should run composer install, which is reading composer.lock file. Composer.lock is "locking" your dependencies to a known state, so you application can't crash.

    评论

报告相同问题?

悬赏问题

  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型
  • ¥50 buildozer打包kivy app失败
  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题