M K
M K

Reputation: 9416

Laravel deploying

My app is not working on the production server. It looks like it fails to autload some classes.

// app/config/app.php
    'Route'           => 'Extended\Route',

// app/library/extended/Route.php
    <?php namespace Extended {}

    class Route extends ... {}

// app/start/global.php
    ClassLoader::addDirectories(array(
        ...
        app_path().'/library',
        ...
    ));

// composer.json
    "autoload": {
        "classmap": [
                ...
                "app/library",
                ...
        ]
    },

I'm receiving this error Class 'Extended\Route' not found

Edit: Deleting the vendors folder and reinstalling all dependencies fixed this problem.

Upvotes: 1

Views: 190

Answers (1)

Antonio Carlos Ribeiro
Antonio Carlos Ribeiro

Reputation: 87789

Usually this fixes those kind of errors for Laravel:

cd /your/application/dir

rm bootstrap/compiled.php

rm -rf vendor

rm composer.lock

composer install --no-dev

Upvotes: 1

Related Questions