For Package Development

A workbench is a project dedicated for creating all your packages.

First step

The first step that needs to be taken, is cloning Laravel. Go to your code directory and run . Your workbench directory will now be called . The location of my workbench is .

Packages folder

Within your workbench you need a directory for your packages. We are going to use this directory to autoload the packages you are creating. For your package you can create directories with the following structure: . This could result in .


Navigate to you package () and run . …

CLI Commands on Steroids

When working with Laravel, you have to use your CLI tool pretty much. I found I was running long commands several times, so I made some handy aliases for them, to quickly run long commands with small abbreviations.

The CLI tool I use is iTerm with Oh My Zsh. Especially Oh My Zsh adds a lot of awesomeness. One I like to most is that you don’t have a capitalize folders and files in the CLI, just hit , and the folder or file name will be completed.


I know some people have other aliases for

View Composers are very handy when you’re including partials on multiple pages. It will ensure the variables used in the partial, are always set, so you won’t get errors like variable not set.

How do View Composers work?

View Composer are created within a Service Provider, and best practice is to create a dedicated Service Provider, called ComposerServiceProvider. Within the boot method, call this code to register a simple View Composer.

In this example we’ll push the variable $message to a partial called header.

Gijs Jorissen

Web Developer. ❤ Laravel, Wordpress, Vue.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store