T
T
The Dragger2015-06-13 20:20:22
Laravel
The Dragger, 2015-06-13 20:20:22

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

3 answer(s)
V
Vyacheslav Plisko, 2015-06-13
@IPD2

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')

D
Dmitry Evgrafovich, 2015-06-13
@Tantacula

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.

F
fearrr, 2015-11-09
@fearrr

laravel.su/docs/sleepingowl_admin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question