在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.

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.