Language Of Laravel Resource Controller
I'm from the Netherlands and I'm making a website using Laravel 5.2 in Dutch. I want to be able to use the
Route::resource('test', 'testController') with Dutch names as the methods of the controller. So basically I want to change the following action names:
- /index becomes /thuis
- /create becomes /maken
- /store becomes /opslaan
and so on..
Is this possible and how would I do it? I don't want to create a single route for every possible action. Thanks in advance!
My package is ready for use. Just follow the instructions. Don't forget to set your locale to nl or in the future to another language.
You can call the resource routes like:
TranslatableRoute::resource('recipe', 'recepten', 'RecipeController');
Where the second argument is the translated name and the first defines the name of your routes.
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?