for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Arcanesoft\Auth\Seeds;
use Arcanesoft\Auth\Bases\Seeder;
use Arcanesoft\Auth\Models\Permission;
use Carbon\Carbon;
/**
* Class PermissionsSeeder
*
* @package Arcanesoft\Auth\Seeds
* @author ARCANEDEV <[email protected]>
*/
abstract class PermissionsSeeder extends Seeder
{
/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
* Seed permissions.
* @param array $permissions
public function seed(array $permissions)
$seeds = $this->prepareSeeds($permissions);
Permission::insert($seeds);
insert()
Arcanesoft\Auth\Models\Permission
insertAndSetId()
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.
}
| Other Functions
* @param array $seeds
* @return array
protected function prepareSeeds(array $seeds)
$now = Carbon::now();
foreach ($seeds as $key => $permission) {
$seeds[$key]['created_at'] = $now;
$seeds[$key]['updated_at'] = $now;
return $seeds;
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.