Laravel Package Development - e21 - Adding Routes, Views & Controllers

preview_player
Показать описание
In this lesson we add views, routes and a controller to our package. We also make a route prefix customizable and add a namespace to our Route group.

About this Course
In this series, we are tackling Laravel Package Development from scratch. Developing your own packages maximizes your code reusability, helps you with versioning and opens a huge door of possibility for external contributions by other developers. Come along for the ride as we learn everything from setting up tests to package auto discovery.
Рекомендации по теме
Комментарии
Автор

I would highly suggest that instead of putting 'path' at around 7:05 to replace this with the term 'prefix' as that is really what we're doing here. This will prevent any confusion between the driver path, and the route prefix.


Also changing the public static method from path() to routePrefix() would be advised as well. Don't forget to also change the call in the BaseServiceProvider in the routeConfiguration() method.

WebDevHacks
Автор

Awesome Laravel Package Development tutorial thus far. Victor can you add one video showing how to add vuejs in the package

joelmnisi
Автор

Is it possible to add guards to the routes? More specific the Laravel/Sanctum guard?

martijndriesen
Автор

Can you add `{{ asset(mix('css/app.css', 'public')) }}` to the view and add a simple test on `Feature/ExampleTest.php` that includes the `$response = $this->get('/'); to check whether this works?

I'm seeing the error `The mix cannot be found`. I ran `yarn build` and the `mix-manifest.json` file is on the `public` directory.

mmikhan