• Время чтения ~0 мин
  • 05.12.2021

Создание маршрутов для контроллера ресурсов работает следующим образом:

Route::resource(
    '/resource',
    'ResourceController',
    $options
);

где /resource – строка, определяющая точку входа (url) и ResourceController – это имя требуемого контроллера ресурсов.

Массив $options – это ассоциативный массив, содержащий любой из следующих элементов:

option type(s) description
only array string dynamic Set the methods the controller should apply to
except array string dynamic Set the methods the controller should exclude
names array string Set the route names for controller actions
names.method string Set the route name for a controller action
parameters string array Override the route parameter names
parameters.previous string Override a route parameter’s name
middleware mixed Set a middleware to the resource

Эти параметры взяты из исходный код.

Comments

No comments yet
Yurij Finiv

Yurij Finiv

Full stack

Про мене

Professional Fullstack Developer with extensive experience in website and desktop application development. Proficient in a wide range of tools and technologies, including Bootstrap, Tailwind, HTML5, CSS3, PUG, JavaScript, Alpine.js, jQuery, PHP, MODX, and Node.js. Skilled in website development using Symfony, MODX, and Laravel. Experience: Contributed to the development and translation of MODX3 i...

Об авторе CrazyBoy49z
WORK EXPERIENCE
Контакты
Ukraine, Lutsk
+380979856297