Hello, I'm working a laravel project. And in this project I have a media table, controller, Model ....
When I create this route Route::resource('media','MediaController');
After tape php artisan route:list, I had this
URI : Name
admin/media | admin.media.index
admin/media | admin.media.store
admin/media/create | admin.media.create
admin/media/{medium} | admin.media.destroy
admin/media/{medium} | admin.media.show
admin/media/{medium} | admin.media.update
admin/media/{medium}/edit | admin.media.edit
I don't undestand why the medium word.
Can you help me please
Hi, There! This word represents a parameter, in this case, an identifier for the target resource of the request. You can change the default generated param name to whatever you want, like this:
Route::resource('media', 'MediaController')->parameters('medium' => 'customName')
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community