Add migrations and seeders support

This commit is contained in:
2021-01-14 14:16:52 +03:00
parent d12744296a
commit cb1f3a6bb5
15 changed files with 196 additions and 311 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace Database\Component\Seeders;
use Illuminate\Database\Seeder;
class AddTestRight extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
if(\App\Models\Right::where('code', 'test')->count() == 0) {
$right = new \App\Models\Right();
$right->code = 'test';
$right->name = 'Тестовый раздел';
$right->save();
}
}
}