thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.77k stars 2.67k forks source link

Not understand the logic #3339

Closed gordonlhw closed 6 years ago

gordonlhw commented 6 years ago

Description:

Hi, I understand that this is not bugs, but i would like to know the logic, because of i am a laravel newbie. Is there any GURU / master who can help / reply me some questions and teach me, because i can't find any proper way to ask these questions. Thank you very much.

Voyager looks fun and first time know that "packages" can use it's own controller & model. I thought everything must be done in proper path "/mylaravel/app/Http", hence i want to learn how to achive the solutions like voyager

  1. As my understand, whatever we want to use any packages function from vendor, have to declare it as auto load first. But, i am not able to find any "voyager" keywords declare in config/app.php or some others setting file.

Is it it is auto load from vendor\TCG\Voyager because of calling voyager::routes() in routes/web.php ?

  1. I attempt to rename main class == Voyager to Voyager1, also changed "voyager" to "voyager1" in VoyagerServiceProvider::register(), but it prompt me "Class 'TCG\Voyager\Voyager1' not found"

$loader->alias('Voyager1', VoyagerFacade::class);

$this->app->singleton('voyager1', function () { return new Voyager1(); });

My question is, if i want to rename or create a new class and service providers under "voyager", where to declare / define it?

Thank you very much.

Steps To Reproduce:

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.