2017 © Pedro Peláez
 

library laravel

Some laravel commands.

image

mauroerta/laravel

Some laravel commands.

  • Thursday, July 19, 2018
  • by mauro.erta
  • Repository
  • 1 Watchers
  • 0 Stars
  • 17 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 89 % Grown

The README.md

Laravel

Some commands and traits., (*1)

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system., (*2)

Prerequisites

Install Laravel:, (*3)

laravel new my-project
cd my-project

Installing

Install mauroerta/laravel, (*4)

cd path/to/your/laravel/project
composer require mauroerta/laravel

And then publish the configuration file and the migrations, run:, (*5)

php artisan vendor:publish

and follow the instructions., (*6)

Commands

Now you have 2 new commands:, (*7)

php artisan make:trait
php artisan make:observer Name --observe=App\\Class\\To\\Observe

Example of make:observer command:, (*8)

php artisan make:observer UserObserver --observe=App\\User

Now you have a new file (UserObserver.php) in app/Observers/, Register the observer in the AppServiceProvider:, (*9)

namespace App\Providers;

// ...
use App\Observers\UserObserver;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        // ...
        App\User::observe(UserObserver::class);
    }

More information about Observers can be found here: Laravel Observers, (*10)

Traits

Linkable Trait, Slugable Trait, Draftable Trait. Description soon., (*11)

Authors

  • Mauro Erta - ME

The Versions

19/07 2018

dev-master

9999999-dev

Some laravel commands.

  Sources   Download

MIT

The Requires

  • php >=7.0

 

by Mauro

laravel commands package