Amatul Uzma
Amatul Uzma

Reputation: 29

Routes in Laravel 8

What should be the route for delete, show, create and update in laravel 8? My routes are...

Route::get('search',[App\Http\Controllers\vController::class, 'index']);

Route::get('/search/{emid}/delete','vController@destroy')->name('search.destroy');
Route::get('/search/{emid}/education','vController@education')->name('search.education');
Route::post('search/eduCreate','vController@eduCreate')->name('search.eduCreate');

Upvotes: 0

Views: 99

Answers (2)

Hadem
Hadem

Reputation: 127

You can use below format as well, I think it works perfectly for any Laravel version.

  Route::get('transaction/download-pdf/{$location}', [
'as' => 'transaction.download-pdf',
'uses' => 'App\Http\Controllers\TransactionsController@downloadPDFFile'

]);

Upvotes: 0

Mhammed Talhaouy
Mhammed Talhaouy

Reputation: 1259

in laravel 8

the routes don't write like that

write them like that ok

Route::get('search',[App\Http\Controllers\vController::class, 'index']);
Route::get('/search/{emid}/delete',[App\Http\Controllers\vController::class, 'destroy'])->name('search.destroy');
Route::get('/search/{emid}/education',[App\Http\Controllers\vController::class, 'education'])->name('search.education');
Route::get('search/eduCreate',[App\Http\Controllers\vController::class, 'eduCreate'])->name('search.eduCreate');

Upvotes: 1

Related Questions