Reputation: 91
Im try to put my laravel aplication to online host, for front end its work try it on ajibb.com, but when im try login to admin not work, for localhost work with nice. when im try open admin i got error :
Sorry, the page you are looking for could not be found.
NotFoundHttpException in RouteCollection.php line 161:
in RouteCollection.php line 161
at RouteCollection->match(object(Request)) in Router.php line 755
at Router->findRoute(object(Request)) in Router.php line 610
at Router->dispatchToRoute(object(Request)) in Router.php line 596
at Router->dispatch(object(Request)) in Kernel.php line 267
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Kernel.php line 149
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 116
at Kernel->handle(object(Request)) in index.php line 57
whats wrong can point me out which part should i set, for url www.ajibb.com/admin. thanks
Upvotes: 1
Views: 430
Reputation: 9
If it working fine on localhost, i'm pretty sure there is something missing on your server. In my experienced before there was missing php-xml plugin, if so you must install it. I assume you're running ubuntu server and php 7 then:
sudo apt-get update
sudo apt-get install php7.0-xml
Or if its already installed, make sure it enabled in php.ini
configuration.
Upvotes: 0
Reputation: 2972
NotFoundHttpException in RouteCollection is thrown when the referred link is not available in route.php
file.
Make sure your link is available in route.php
Route::get( 'admin', function() {
return 'your admin view';
});
If you use a Controller,
Route::get( 'admin','your admin controller@index'); //assuming you used default
Upvotes: 0
Reputation: 4024
You should have something like this set in your routes file:
Route::get( 'admin', [
'uses' => 'AdminController@getIndex', // point to your admin controller
'as' => 'admin.index' // give your route an optional name
]);
Or just test it with
Route::get( 'admin', function() { return 'works!' });
Upvotes: 2