fk/laravel-references

Just docs and auto-completion for Laravel development
117 1
Install
composer require fk/laravel-references
Latest Version:v2.0.10
Last Updated:Mar 16, 2020
Links: GitHub  ·  Packagist
Maintainer: yelfive

laravel-references

Class references for the Laravel default facades and methods that invoke __call of a class

This is convenient for IDE code completion Inspired by barryvdh

Directory

  • config
    • framework.php

      Contains all caller => callee classes

    • framework.__call.php

      Contains all refers in __call, this will be called recursively

Register

<?php

namespace App\Providers;

use fk\reference\IdeReferenceServiceProvider;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    public function register()
    {
        $this->app->register(IdeReferenceServiceProvider::class);
    }
}

Publish

artisan vendor:publish

Usage

Generate a eloquent model with properties with database constrains (as rules).

artisan reference:model table_name

Event: Eloquent saving

Register event-listener in your event provider, and then every saving will validate the rules in Eloquent first.

How

Update \App\Providers\EventServiceProvider set $listen

protected $listen = [
    \App\Events\ModelSaving::class => [
        \App\Listeners\CheckRules::class,
    ],
];

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...

625,281,324 9,703
laravel/framework

The Laravel Framework.

572,249,171 34,893
laravel/tinker

Powerful REPL for the Laravel framework.

481,927,243 7,441