0
votes

I am using Laravel Framework version 4.2.17. I have made a new controller, model and Views on my localhost and after testing the code i uploaded them to live server.

For routes i am using laravel resources:

Route::resource('templates', 'EmailsController',['as' => 'admin']);

My controller is inside a folder i.e

app->controllers->admin

File name is: EmailsController.php

Controller: class EmailsController extends \AdminBaseController {...}

Now if i access

www.example.com/admin/templates

for this specific controller is am getting 500 error. If i change the route to other controller i.e

Route::resource('templates', 'JobsController',['as' => 'admin']);

the link

www.example.com/admin/templates

shows me all job listing.

Any Ideas?

Thanks

1
is your JobsController extends AdminBaseController ?mcklayin
What is the error? Turn on debugging, or look in /storage/logs for the error message. "500 error" means that the server had an error -- you need to find out what this error is.Ben Claar
@mcklayin yes the JobsController extends the AdminBaseController.FaisalShehzad

1 Answers

1
votes

After creating new controller.You need to do

composer dump-autoload

and

php artisan dump-autoload

on the terminal.This is necessary to know the laravel that the new controller is created.Mapping is done by composer.