Wallogit.com
2017 © Pedro Peláez
Just docs and auto-completion for Laravel development
Class references for the Laravel default facades
and methods that invoke __call of a class, (*1)
This is convenient for IDE code completion
Inspired by barryvdh, (*2)
config, (*3)
framework.php, (*4)
Contains all caller => callee classes, (*5)
framework.__call.php, (*6)
Contains all refers in __call, this will be called recursively, (*7)
<?php
namespace App\Providers;
use fk\reference\IdeReferenceServiceProvider;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
public function register()
{
$this->app->register(IdeReferenceServiceProvider::class);
}
}
artisan vendor:publish
Generate a eloquent model with properties with database constrains (as rules)., (*8)
artisan reference:model table_name
Register event-listener in your event provider, and then every saving will validate the rules in Eloquent first., (*9)
How, (*10)
Update \App\Providers\EventServiceProvider set $listen, (*11)
protected $listen = [
\App\Events\ModelSaving::class => [
\App\Listeners\CheckRules::class,
],
];