jeudi 5 avril 2018

Laravel error: "Sorry, the page you are looking for could not be found"

I need to update a website from a colleague to just add a LDAP connexion.

I use EasyPHP devserver 17.0 with php 7.1.3 and MySQL 5.7.17.

I've read a lot of docs etc to be started and to recover the site in local as it is working actually.

Everything was working so I began to add a login form etc... but when I tried to test a link from the website, it return me the error "Sorry, the page you are looking for could not be found". So I began to search on forums I found some results about routes etc and everything I've tested didn't worked.

So, I decide to use the backup from the website as it was when I juste restore it in local(I precise link to other page and everything was working). I check the link and again, "Sorry, the page you are looking for could not be found". I decide to try another developement tool and download XAMP, exactly same error. I tried with Wamp, Laragon always same error.

In the apache conf mod_rewrite is enabled.

My laravel framework version is: 5.5.39

So my folder look like:

Laravel version 5.5.39

The content of routes > web.php:

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

// Holidays
Route::get('/holidays/create', 'HolidayController@create')->name('holidays.create');
Route::post('/holidays', 'HolidayController@store')->name('holidays.store');
Route::get('/holidays/{holiday}/delete', 'HolidayController@destroy')->name('holidays.destroy');
Route::get('/holidays/{holiday}/edit', 'HolidayController@edit')->name('holidays.edit');
Route::post('/holidays/{holiday}', 'HolidayController@update')->name('holidays.update');

// Leave types
Route::get('/types/create', 'TypeController@create')->name('types.create');
Route::post('/types', 'TypeController@store')->name('types.store');
Route::get('/types/{type}/delete', 'TypeController@destroy')->name('types.destroy');
Route::get('/types/{type}/edit', 'TypeController@edit')->name('types.edit');
Route::post('/types/{type}', 'TypeController@update')->name('types.update');

// Users
Route::resource('users', 'UserController');
Route::get('/births', 'UserController@getAllBirths')->name('births');

// Leaves
Route::get('/calendar', 'LeaveController@index')->name('calendar');
Route::post('/leaves', 'LeaveController@store')->name('leaves.store');
Route::post('/leaves/{leave}', 'LeaveController@update')->name('leaves.update');
Route::get('/leaves/{leave}/delete', 'LeaveController@delete')->name('leaves.delete');
Route::get('/leaves', 'LeaveController@getAll')->name('leaves');

Route::get('/config', 'ConfigController@index')->name('config');

// Stats
Route::get('/statistics', 'StatsController@index')->name('stats.index');

Auth::routes();

I don't know what I could do but please ask me if you need more information to help me.

If it can help; gitLab link from the site I'm trying to restore: https://gitlab.com/balsigergil/btplan



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire