Patrick Brian Garcia
Patrick Brian Garcia

Reputation: 45

(1/1) NotFoundHttpException in RouteCollection.php line 179

I have a problem regarding a system that a previous developer created. The system is deployed in his own terminal using XAMPP and accessed by many users in our company. The computer where the System is deployed is about to be broken. I plan to transfer it to a server or to my terminal. I installed all the needed applications to create and run a laravel project.

My problem is that when I transferred the application to my terminal, this error shows up when I access it:

(1/1) NotFoundHttpException in RouteCollection.php line 179

I tried to create a new project and deploy it but there is no problem.

I tried to copy the existing XAMPP installation, just so all the configurations he made will be copied. But it still doesn't work.

I tried to do php artisan route:cache as suggested by the internet.

See codes below(This codes are like what I see in other questions here), I don't know what to show so if ever you guys need any other source codes just ask.

Routes

<?php

//USER RESOURCE
Route::get('/login', ['as' => 'login', 'uses' => 'UserController@index']);
Route::post('/login', 'UserController@login');
Route::get('/logout', 'UserController@logout');



//DISCONNECT RESOURCE
Route::resource('/disconnections', 'DisconnectionController');
Route::get('/get_freco_datatable', 'DisconnectionController@get_freco_datatable');
Route::get('/get_freco_datatable_filtered/{start_date}/{end_date}','DisconnectionController@get_freco_datatable_filtered');
Route::get('/get_account_fbilmast/{acnt_code}', 'DisconnectionController@get_account_fbilmast');
Route::get('/get_freco_datatable_all', 'DisconnectionController@get_freco_datatable_all');
Route::get('/get_for_tagging_table','DisconnectionController@get_for_tagging_table');
Route::get('/get_for_tagging_table_filtered/{start_date}/{end_date}','DisconnectionController@get_for_tagging_table_filtered');
Route::post('/save_new_disconnection_from_tagging_table/{id}/{field}/{value?}','DisconnectionController@save_new_disconnection_from_tagging_table');
Route::get('/get_old_freco','DisconnectionController@get_old_freco');
Route::get('/get_total_disconnection_per_book_no_table','DisconnectionController@get_total_disconnection_per_book_no_table');
Route::get('/get_total_disconnection_per_book_no_table_filtered/{start_date}/{end_date}','DisconnectionController@get_total_disconnection_per_book_no_table_filtered');


//RECONNECTION RESOURCE
Route::resource('/reconnections', 'ReconnectionController');
Route::get('/get_fdisco_datatable', 'ReconnectionController@get_fdisco_datatable');
Route::get('/get_fdisco_datatable_filtered/{start_date}/{end_date}','ReconnectionController@get_fdisco_datatable_filtered');


//SPECIAL RECO DISCO RESOURCE
Route::resource('/special-reco-disco', 'SpecialRecoDiscoController');
Route::get('/createSpecReco/create', 'SpecialRecoDiscoController@createSpecReco');
Route::get('/createSpecDisco/create', 'SpecialRecoDiscoController@createSpecDisco');
Route::get('/editSpecReco/{id}/edit', 'SpecialRecoDiscoController@editSpecReco');
Route::get('/editSpecDisco/{id}/edit', 'SpecialRecoDiscoController@editSpecDisco');
Route::delete('/destroySpecReco/{id}', 'SpecialRecoDiscoController@destroySpecReco');
Route::delete('/destroySpecDisco/{id}', 'SpecialRecoDiscoController@destroySpecDisco');
Route::get('/get_special_disco_datatable', 'SpecialRecoDiscoController@get_special_disco_datatable');
Route::get('/get_special_reco_datatable', 'SpecialRecoDiscoController@get_special_reco_datatable');
Route::get('/get_special_disco_datatable_filtered/{start_date}/{end_date}', 'SpecialRecoDiscoController@get_special_disco_datatable_filtered');
Route::get('/get_special_reco_datatable_filtered/{start_date}/{end_date}', 'SpecialRecoDiscoController@get_special_reco_datatable_filtered');


//PROMISSORY NOTE RESOURCE
Route::resource('/promissory-notes', 'PromissoryNoteController');
Route::get('/get_fdispn_datatable', 'PromissoryNoteController@get_fdispn_datatable');
Route::get('/get_fdispn_datatable_filtered/{start_date}/{end_date}', 'PromissoryNoteController@get_fdispn_datatable_filtered');
Route::get('/get_promissory_note_tagging_table','PromissoryNoteController@get_promissory_note_tagging_table');
Route::get('/get_promissory_note_dispatch_data','PromissoryNoteController@get_promissory_note_dispatch_data');
Route::get('/get_promissory_note_dispatch_data_filtered/{start_date}/{end_date}','PromissoryNoteController@get_promissory_note_dispatch_data_filtered');
Route::get('/get_promissory_note_breakdown/{acnt_code}/{pn_id}','PromissoryNoteController@get_promissory_note_breakdown');
Route::get('/add_promissory_note_breakdown_page/{acnt_code}/{pn_id}','PromissoryNoteController@add_promissory_note_breakdown_page');
Route::post('/add_promissory_note_breakdown','PromissoryNoteController@add_promissory_note_breakdown');
Route::post('/update_promissory_note_breakdown/{id}','PromissoryNoteController@update_promissory_note_breakdown');
Route::get('/generate_promissory_note_breakdown/{acnt_code}/{pn_id}/{breakdown}','PromissoryNoteController@generate_promissory_note_breakdown');

//DISPATCH CREW RESOURCE
Route::resource('/dispatch-crew', 'DispatchCrewController');
Route::get('/get_book_no_fbilmast/{book_no}', 'DispatchCrewController@get_book_no_fbilmast');
Route::get('/get_crew_data', 'DispatchCrewController@get_crew_data');
Route::get('/get_crew_data_filtered/{start_date}/{end_date}', 'DispatchCrewController@get_crew_data_filtered');
Route::get('/get_crew_dispatch_data/{book_no}/{crew_no}/{crew_name}/{day}', 'DispatchCrewController@get_crew_dispatch_data');
Route::get('/get_saved_generated_dispatch_per_day_data','DispatchCrewController@get_saved_generated_dispatch_per_day_data');
Route::get('/get_saved_generated_dispatch_per_day_data_filtered/{start_date}/{end_date}','DispatchCrewController@get_saved_generated_dispatch_per_day_data_filtered');
Route::get('/get_promissory_note_discon_data','DispatchCrewController@get_promissory_note_discon_data');
Route::get('/get_crew_dispatch_data_test','DispatchCrewController@get_crew_dispatch_data_test');


//DISPATCH RESOURCE
Route::get('/get_dispatch_data', 'DispatchController@get_dispatch_data');


//BILLING INQUIRY RESOURCE
Route::resource('/billing-inquiry','BillingInquiryController');
Route::get('/get_billing_inquiry_datatable','BillingInquiryController@get_billing_inquiry_datatable');
Route::get('/get_billing_ledger_datatable/{account_number}/{start_month?}/{start_year?}/{end_month?}/{end_year?}','BillingInquiryController@get_billing_ledger_datatable');
Route::get('/get_billing_ledger_datatable_json/{account_number}/{start_month?}/{start_year?}/{end_month?}/{end_year?}','BillingInquiryController@get_billing_ledger_datatable_json');


//FAQ
Route::resource('/faq','FAQController');

//PRINT FORMS
Route::get('/get_promissory_note_print_form/{id}/{breakdown}','PromissoryNoteController@get_promissory_note_print_form');
Route::get('/get_dispatch_crew_job_order_form/{book_no}','DispatchCrewController@get_dispatch_crew_job_order_form');
Route::get('/get_reconnection_job_order_form/{acnt_code}','ReconnectionController@get_reconnection_job_order_form');
Route::get('/get_disconnection_grid_form/{row_id?}/{selected?}','DisconnectionController@get_disconnection_grid_form');
Route::get('/get_billing_ledger_form/{account_number}','BillingInquiryController@get_billing_ledger_form');
Route::get('/get_dispatch_crew_job_order_form_test/{book_no}','DispatchCrewController@get_dispatch_crew_job_order_form_test');


//MISCELLANEOUS
Route::get('/dispatch_per_day_update_reconnection','ReconnectionController@dispatch_per_day_update_reconnection');

//Paper Dashboard Test

Route::get('/paper-dashboard', function() {
    return view('paperdashboard');
});

I don't know what else I can do with this, since I'm not using laravel to develop systems.

Upvotes: 0

Views: 821

Answers (3)

guttume
guttume

Reputation: 278

Assuming that you are getting the (1/1) NotFoundHttpException in RouteCollection.php line 179 on the root url. If you look at your routes file, there is no route defined to handle root url i.e. '/'. Did you try to visit '/login' and check if it works?

Upvotes: 2

Sajad Haibat
Sajad Haibat

Reputation: 717

are you accessing the site using localhost\yourproject\public? if yes, then try php artisan serve on the root directory of your file.

Then it will give you http://127.0.0.1:8000, just paste that on browser and you will access your site

Upvotes: 0

tirta keniten
tirta keniten

Reputation: 427

Things to do after migrating laravel to new server is:

* I assume you already run composer install

  1. create the configuration file. Copy the .env.example to .env and start configuring based on your environment
  2. cache the config php artisan config:cache, also do it every time you change the configuration file
  3. I suggest run on Docker instead of XAMPP. I found easier way to develop Laravel App with Docker.
  4. php artisan route:cache only work if there is no closure on routes.

I hope it helps.

Upvotes: 1

Related Questions