Closed denistorresan closed 8 years ago
Hi.
Maybe set global controller class?
AdminSection::registerModel(Contact3::class, function (ModelConfiguration $model) {
$model->setControllerClass(\App\Http\Controller\MyCustomContact3Controller::class);
$model->onDisplay(function () { ... });
});
And you will create controller
class MyCustomContact3Controller extends \SleepingOwl\Admin\Http\Controllers\AdminController
{
public function getCreate(ModelConfiguration $model)
{
...
// Custom logic
...
return $this->render($model, $create);
}
}
Hello, great! I think in this way it's very easy to customize logic! Great work, thank you!
You are welcome! :) Try new release https://github.com/LaravelRUS/SleepingOwlAdmin/releases/tag/4.16.86-beta
Hello, there's a way to set a specific controller that override the standard controller for a specific model? I mean something like this:
I think it's very useful for making custom behaviour on list or save (IE: elaborate data before save or call background shell commands etc..).