rafni/laravel-toolkit

Some tools for Laravel development, only commands and helpers to streamline developments
22 2
Install
composer require rafni/laravel-toolkit
Latest Version:v5.1.2
PHP:>=5.6
License:MIT
Last Updated:Sep 27, 2017
Links: GitHub  ·  Packagist
Maintainer: rafni

laravel-toolkit

Versions

This is version 5.1 of the development kit for the Laravel 5.0 framework or higher.

Installation

To install this update your composer.json file to require

    "rafni/laravel-toolkit" : "~5.*"

Once the dependencies have been downloaded, add the service provider to your config/app.php file

    'providers' => [
        ...
        Rafni\LaravelToolkit\Providers\LaravelToolkitServiceProvider::class
        ...
    ]

You are done with the installation!

How to use

Once installed, use the scaffold provided by the tool kit is very simple, just write in the artisan console of your project the following command:

    php artisan toolkit:package "service_name"

Use the command without quotes and in singular.

In the artisan console, if the process was successful, it will give you the access routes of the new generated resource, copy and paste these routes in the route file corresponding to your version of Laravel.

This will automatically generate the following files in your project:

    app/
        Http/
            Controllers/
                NameSpace/
                    ServiceNameController.php
        Repositories/
            NameSpace/
                ServiceNameEloquent.php
                ServiceNameService.php
                ServiceNameContract.php
    resources/
        views/
            NameSpace/
                index.blade.php
                show.blade.php
                create.blade.php
                edit.blade.php
                

Finally, in order for the contracts injected in the construction of the controllers do not result in a critical error, you must bind them to the service that will manage the service logic.

In your app/providers/AppServiceProvider.php file, bind them as follows:

    public function register()
    {
        ...
        $this->app->bind(ExampleServiceContract::class, ExampleService::class);
        ...
    }

Documentation

For documentation on this package, please visit the wiki.

Change log

Please see the releases page https://github.com/rafni/laravel-toolkit/releases

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email jose at ditecnologia dot com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Related Packages

erirk/paypalpayment

laravel-paypalpayment is simple package help you process direct credit card paym...

0
gabrieloliverio/laravel5-generators

Database metadata-based generators for Laravel 5

1
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

628,058,007 9,707
laravel/framework

The Laravel Framework.

572,249,171 34,893
laravel/tinker

Powerful REPL for the Laravel framework.

485,678,092 7,440