Latest

Thursday, July 13, 2017

Xampp Laravel 5.4 NotFoundHttpException in RouteCollection.php line 179:

Asked by: itvba


I've always worked from the server but i want to try programming locally and push it into the github repository.

I've downloaded all files from the server and i put all the files in the xampp htdocs folder. When i try to access the project it gives me this error: NotFoundHttpException in RouteCollection.php line 179:. It seems like it cannot find my routes.. What am i doing wrong? I'm using Laravel 5.4

EDIT:: This also happens when i install a fresh copy of Laravel 5.4

HTACCESS:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

<IfModule mod_headers.c>
  <FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css|css)$">
    Header set Access-Control-Allow-Origin "*"
  </FilesMatch>
</IfModule>

Routes:

Route::get('/', function () {
  return view('welcome');
});

Auth::routes();

Route::group(['prefix' => 'account'], function () {
    Route::get('/my_account', 'AccountController@myAccount');
    Route::post('/my-account/save/{id}', 'AccountController@update');
});

Route::group(['prefix' => 'todo'], function () {
    Route::post('/create', 'ToDoController@create');
    Route::get('/destroy', 'ToDoController@destroy');
});

Route::group(['prefix' => 'callback'], function () {
    Route::post('/create', 'CallBackController@create');
    Route::get('/destroy', 'CallBackController@destroy');
});

Route::group(['prefix' => 'customer'], function () {
    Route::post('/create', 'CustomerController@create');
    Route::get('/{cr}', 'CustomerController@find');
    Route::post('/rent/{id}', 'CustomerController@create_order');
    Route::post('/rent-edit/{id}', 'CustomerController@cEdit');
    Route::post('/edit/{id}', 'CustomerController@edit');
});

Route::group(['prefix' => 'products'], function () {
    Route::get('/index', 'ProductController@index');
    Route::post('/create', 'ProductController@create');
    Route::post('/edit/{id}', 'ProductController@edit');
    Route::get('/delete/{id}', 'ProductController@delete');
});

Route::group(['prefix' => 'employer'], function () {
    Route::get('/', 'EmployerController@index');
    Route::get('/{rr}', 'EmployerController@find');
    Route::post('/create', 'EmployerController@create');
    Route::post('/delete/{rr}', 'EmployerController@delete');
    Route::post('/edit/{rr}', 'EmployerController@edit');
});

Route::group(['prefix' => 'search'], function () {
    Route::any('/customer', 'SearchController@search_customer');
    Route::any('/employee', 'SearchController@search_employee');
});

Route::group(['prefix' => 'requests'], function () {
    Route::get('/', 'RequestOfferController@index');
    Route::any('/create', 'RequestOfferController@create');
    Route::get('/create_offer/{request}', 'RequestOfferController@createOffer');
    Route::post('/create_offer/{request}', 'RequestOfferController@saveCreateOffer');
    Route::get('/accept/{requests}', 'RequestOfferController@accept');
    Route::get('/delete/{requests}', 'RequestOfferController@delete');
});

Route::group(['prefix' => 'offer'], function () {
    Route::get('/', 'OfferController@index');
    Route::get('/find/{id}', 'OfferController@find');
    Route::get('/create_pdf/{id}', 'PdfController@createofferpdf');
});


    Route::get('/home', 'HomeController@index')->name('home');
    Route::get('/customerlist', 'CustomerController@index');


Source

No comments:

Post a Comment

Adbox