In laravel 5.4 , When I want to use url I've to config in web.php ex
Route::get('/test/{id}', function () {
return view('frontend/test/{id}');
});
Is their anyway to store path into database and use It with out maunal config in web.php
for example I want to change /test/1, /test/2 to test/test1 , test/test2
which I can Update delete in database In my database I've url path
test1
test2
If the name is stored within the database simply change:
<a href="link/{{ $variable->id }}
to <a href="link/{{ $variable->name }}
Then change your route from:
Route::get('/test/{id}', function () {
return view('frontend/{id}');
});
to
Route::get('/test/{name}', function () {
return view('frontend/{name}');
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With