Ad

Only One Route Not Returning Anything On Live Laravel Site, Works On Local Sites

- 1 answer

I am working on a Laravel site on two different linux machines, and everything is working fine. However, on two separate Amazon EC2 instances one particular route returns nothing (no errors, and no content) and there is nothing in the logs. My local machines run Arch (PHP 7.0.3) and Mint (PHP 5.5.9) and the EC2 instances run Ubuntu (with PHP 5.5.9) and Amazon Linux (PHP 5.6.17). The route that is not returning anything is set up as follows in my routes.php file:

Route::group(['prefix' => 'admin'], function () {
    Route::resource('teacher', 'Admin\TeacherController');
}

Route::group(['middleware' => ['admin']], function () {
    Route::resource('admin/teacher', 'Admin\TeacherController');
}

All the other routes set up this way are working perfectly on all environments which is what makes this seem so strange. There are no folders in the public directory with the names admin or teacher. Does anyone have any ideas?

Ad

Answer

I managed to solve the problem with 'composer dumpautoload' Not sure why it wasn't working only on one route, but that was my solution. Hope this helps someone else!

Ad
source: stackoverflow.com
Ad