• Czas czytania ~1 min
  • 05.12.2021

Tworzenie tras dla kontrolera zasobów działa w następujący sposób:Creating routes for a resource controller works like:

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

where /resource is the string defining the entry point (url) and ResourceController is the name of the required resource controller.

Tablica $options jest tablicą asocjacyjną zawierającą dowolne z następujących opcji:

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

Te opcje pochodzą z kodu źródłowego.

Comments

No comments yet
Yurij Finiv

Yurij Finiv

Full stack

O

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...

O autorze CrazyBoy49z
WORK EXPERIENCE
Kontakt
Ukraine, Lutsk
+380979856297