Courses

How to Create Laravel Package: Step-by-Step Example

Package Config

You may want your package users to customize not only the Views and Assets but also some options to be configurable.

For that, we create our config file and allow it to be publishable. Then, in the package source, we can refer to the values as config('name', 'default_value'), as you would do in any typical Laravel project...

The full lesson is only for Premium Members.
Want to access all 12 lessons of this course? (33 min read)

You also get:

  • 74 courses
  • Premium tutorials
  • Access to repositories
  • Private Discord