Closed AlexMcowkin closed 6 years ago
Unfortunately, customizing the controller actions is not as straight forward as I would like it to be. Your best bet is to disable the routes provided by the package (via the config) and then copy and paste the route details from the package into your main routes file. Make sure that you set up those new route listings with the proper namespace settings so that Laravel can still use the package controllers for the routes that you don't want to customize.
From there you can set up your own controller actions for the routes you do want to customize, which should then allow you to achieve what you are looking for.
can you update your extension and add custom view in every action? // for forgot $this->viewFinder(config('sentinel.view.user_forgot', 'Sentinel::users.forgot'));
// for reset $this->viewFinder(config('sentinel.view.user_reset', 'Sentinel::users.reset'));
Did my first suggestion work? I would be open to a pull request.
Hello. thnx. so If you cant... How can I disable forgot routes in package? and set it in my routes ?
You If you haven't done so already, you should publish the package config files (there are instructions in the readme.)
You can then disable the package routes by editing the sentinel config file.
Hi. In sentinel.php I disabled 'routes_enabled' => false,
in my web.php I added
Route::group(['namespace' => 'Sentinel\Controllers', 'middleware' => ['web']], function () {
Route::get('forgot', ['as' => 'sentinel.forgot.form', 'uses' => 'wwwRegistrationController@forgotPasswsssordForm']);
});
I know. I put wrong classs. But I want it for test.
so...
It does not work. I still use package routes
If I disable all rules so I need rewrite all of these form routes.php?
I did it. thankx. It is very difficult for me after Yii2
Excellent! I am glad that was able to work for you. Let me know if you have any other questions.
I need set view for forgot form. So I need modify forgotPasswordForm()
public function forgotPasswordForm() { return $this->viewFinder(config('sentinel.view.user_forgot', 'Sentinel::users.forgot')); }
How I can extent your RegistrationController? thank you