Answer the question
In order to leave comments, you need to log in
What is the best way to understand SleepingOwl?
I decided to install SleepingOwl , I do everything Russian doc sleeping-owl.github.io/ru/Getting_Started/Menu_Con...
the doc says: Creating a menu item for the model
Admin::menu(\Foo\Bar\Model::class) - it asks to specify the model and then its static function.
I have a model that processes controller-a requests, how will it generate ?
Or I misunderstood?
Answer the question
In order to leave comments, you need to log in
No there is not a static function, it is a static attribute that returns the name of the class. \Foo\Bar\Model::class will return "\Foo\Bar\Model", but this notation has a number of refactoring advantages. As a result, you bind a model to the menu item and set the configuration for its CRUD.
If you want the menu item to lead not to CRUD for the model, but to a specific action in the controller, then use
Admin::menu()->url('my-url')->uses('\App\HTTP\Controllers\MyController @getAction')
I recently tried it myself, but there is absolutely incomprehensible documentation. Switch to pingpong admin and don't waste your time, everything is transparent and intuitive there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question