2017 © Pedro Peláez
 

library workbench

Bring workbench back to Laravel 5.

image

jackiedo/workbench

Bring workbench back to Laravel 5.

  • Wednesday, June 7, 2017
  • by JackieDo
  • Repository
  • 3 Watchers
  • 9 Stars
  • 1,653 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 41 Forks
  • 2 Open issues
  • 42 Versions
  • 35 % Grown

The README.md

As of July 1 2020, Laravel Workbench is no longer maintained., (*1)

It will still exist as an archive, but it will not be taken care of, resolve issues and no new releases will be released in the future., (*2)

Because the versions of the package have been fragmented, at the same time its features are no longer useful and suitable for modern Laravel versions, I decided to stop developing for it. Instead, I built another more efficient package called Laravel Packager and put energy into it., (*3)

Jackie Do, (*4)


Laravel Workbench

Latest Stable Version Total Downloads Latest Unstable Version License, (*5)

Laravel Workbench (originally from Laravel 4.x, has now stopped growing) support our in building perfect structured packages for Laravel without spending a lot of time., (*6)

This package was created to bring Laravel Workbench back to Laravel 5+ and higher. Let this package support you in every detail through it's powerful features., (*7)

Features

  • Build directory structure for package.
  • Generate a standard composer.json file for package.
  • Generate a standard Service Provider file for package.
  • Generate some scaffold resources file, such as:
    • Facade files
    • Interface files
    • Abstract files
    • Exception files
    • Controller files
    • Middleware files
    • Model files
    • Artisan CLI files
    • Configuration file
    • Migration files
    • Language files
    • View files
    • Route file
    • Helper file
    • ...
  • Autoload dumping to be able to use your package immediately (by adding Service Provider of your package into providers section in config/app.php file or using discovery package feature through extra/laravel section in composer.json file).

Overview

Look at one of the following topics to learn more about Laravel Workbench, (*8)

Versions and compatibility

Each branch of Laravel Workbench is similarities with each version of Laravel 5+. Currently, this package supports the following versions of Laravel:, (*9)

Branch Laravel version
5.0 5.0
5.1 5.1
5.2 5.2
5.3 5.3
5.4 5.4
5.5 5.5
5.6 5.6

In each branch we have multiple versions, tagged syntax as 5.0.*, 5.1.*, 5.2.*..., (*10)

Installation

Step 1 - Install this package through Composer., (*11)

Run the composer require command from the terminal on your project source:, (*12)

$ composer require jackiedo/workbench:{{laravel-version}}.*

Note: The {{laravel-version}}.* string above is main version of Laravel that you want to install Laravel Workbench on it. Example, if you want to install this package on Laravel 5.6, you have to set require is jackiedo/workbench:5.6.*, (*13)

Step 2 - Add mechanism to autoload service provider (for Laravel 5.4 or earlier only)., (*14)

Open config/app.php file, and add a new item to the providers array:, (*15)

...
'providers' => array(
    ...
    Jackiedo\Workbench\WorkbenchServiceProvider::class,
),

Note: If we are using Laravel version 5.5 or later, with the feature Discovery Packages, we can skip above step., (*16)

Step 3 - Publish the configuration file., (*17)

From the terminal on your project source, run the command as follow:, (*18)

$ php artisan vendor:publish --provider="Jackiedo\Workbench\WorkbenchServiceProvider" --force

Note: You should use --force option in publish command to override configuration file with newest one., (*19)

Step 4 - Register the workbench package loaders., (*20)

Open the bootstrap/app.php file at the root of Laravel project and put this following code at the very top of script (after the PHP open tag):, (*21)

<?php

/*
|--------------------------------------------------------------------------
| Register The Workbench Loaders
|--------------------------------------------------------------------------
|
| The Laravel workbench provides a convenient place to develop packages
| when working locally. However we will need to load in the Composer
| auto-load files for the packages so that these can be used here.
|
*/

if (is_dir($workbench = __DIR__.'/../workbench'))
{
    Jackiedo\Workbench\Starter::autoload($workbench);
}

Step 5 - Add mechanism to auto discover workbench packages (for Laravel 5.5 or later only)., (*22)

In this final step, if we are using Laravel version 5.5 or later, we should to add the feature Auto Discover Workbench Packages into post-autoload-dump section in composer.json file of our Laravel project., (*23)

Open composer.json file, and add the line @php artisan workbench:discover after the line @php artisan package:discover as follow:, (*24)

"post-autoload-dump": [
    ...
    "@php artisan package:discover",
    "@php artisan workbench:discover"
]

Note: If we are using Laravel version 5.4 or earlier, we do not perform the above step., (*25)

Usage

Now, you can use workbench commands to create your packages same as on Laravel 4.2., (*26)

Note: Before you create a package, you should to update name and email config value in your config/workbench.php file., (*27)

Creating a basic package.

Syntax:, (*28)

$ php artisan workbench:make vendor/name

Note: The vendor/name string above is the form of your package name. Example: jackiedo/demo-package, (*29)

Creating a package with generating some scaffold resources.

Syntax:, (*30)

$ php artisan workbench:make vendor/name --resources

Dump autoloader for all workbench packages

During the process of building your package, every time you generate a new class, file or change the composer.json file of package, you should rebuild the autoloader for the package through the following command:, (*31)

$ php artisan workbench:dump-autoload

Manual discover workbench packages

During the process of building your package, every time you change the extra/laravel section in composer.json file of your package, you should rebuild cached through the following command:, (*32)

$ php artisan workbench:discover

Or you can use the composer dump-autoload command, because we add above command into post-autoload-dump section in composer.json file of Laravel project during the installation process., (*33)

Delete an existing workbench package

Syntax:, (*34)

$ php artisan workbench:delete vendor/name

Screenshot

Create package without generating scaffold resources., (*35)

create-without-resources result-without-resources, (*36)

Create package with generating scaffold resources., (*37)

create-with-resources result-with-resources, (*38)

Create package with generating scaffold resources and point PSR-4 autoloading namespace to the src directory., (*39)

create-with-point-namespace-to-src-dir result-with-point-namespace-to-src-dir, (*40)

Configuration

All details are provided in your config/workbench.php as comments (you have to run Artisan vendor:publish command before). Please read carefully before use., (*41)

Other documentation

For more documentation about package development, you can visit Official Laravel Documentation pages:, (*42)

The Versions

07/06 2017

dev-master

9999999-dev

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

07/06 2017

5.4.x-dev

5.4.9999999.9999999-dev

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

07/06 2017

5.4.5

5.4.5.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

07/06 2017

5.3.x-dev

5.3.9999999.9999999-dev

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

07/06 2017

5.3.5

5.3.5.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

07/06 2017

5.2.x-dev

5.2.9999999.9999999-dev

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

07/06 2017

5.2.7

5.2.7.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

07/06 2017

5.1.x-dev

5.1.9999999.9999999-dev

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

07/06 2017

5.1.7

5.1.7.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

07/06 2017

5.0.x-dev

5.0.9999999.9999999-dev

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

07/06 2017

5.0.7

5.0.7.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

07/06 2017

5.4.4

5.4.4.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

07/06 2017

5.3.4

5.3.4.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

07/06 2017

5.1.6

5.1.6.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

07/06 2017

5.2.6

5.2.6.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

07/06 2017

5.0.6

5.0.6.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

18/05 2017

5.4.3

5.4.3.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

18/05 2017

5.3.3

5.3.3.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

18/05 2017

5.2.5

5.2.5.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

18/05 2017

5.1.5

5.1.5.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

18/05 2017

5.0.5

5.0.5.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

17/05 2017

5.4.2

5.4.2.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

17/05 2017

5.3.2

5.3.2.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

17/05 2017

5.2.4

5.2.4.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

17/05 2017

5.0.4

5.0.4.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

17/05 2017

5.0.3

5.0.3.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

16/05 2017

5.4.1

5.4.1.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

16/05 2017

5.3.1

5.3.1.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

16/05 2017

5.2.3

5.2.3.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

16/05 2017

5.1.4

5.1.4.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

16/05 2017

5.0.2

5.0.2.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

25/01 2017

5.4.0

5.4.0.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

18/01 2017

5.3.0

5.3.0.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

18/01 2017

5.2.2

5.2.2.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

18/01 2017

5.1.3

5.1.3.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

18/01 2017

5.2.1

5.2.1.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

18/01 2017

5.1.2

5.1.2.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

18/01 2017

5.0.1

5.0.1.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

16/01 2017

5.2.0

5.2.0.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

16/01 2017

5.1.1

5.1.1.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

16/01 2017

5.1.0

5.1.0.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do

13/01 2017

5.0.0

5.0.0.0

Bring workbench back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jackie Do