Support the ongoing development of Laravel.io →
Routing Laravel

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

Last updated 2 years ago.
0

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')

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.