1. Go to this page and download the library: Download sigep/eloquent-enhancements library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sigep / eloquent-enhancements example snippets
use Sigep\EloquentEnhancements\Traits\Error
setErrors(Illuminate\Support\MessageBag $errors)
errors()
use Sigep\EloquentEnhancements\Traits\SaveAll;
class User extends Eloquent
{
use Sigep\EloquentEnhancements\Traits\Error;
use Sigep\EloquentEnhancements\Traits\SaveAll;
public function phones()
{
return $this->hasMany('Phone');
}
}
class Phone extends Eloquent
{
public function user()
{
return $this->belongsTo('User');
}
}