- Complete GGZ Ecademy Laravel backend application - RESTful API for learning products, members, filters - Authentication and authorization system - Database migrations and seeders - Custom CRUD generator commands - Email notification system - Integration with frontend applications
This commit is contained in:
41
database/seeds/BranchSeeder.php
Normal file
41
database/seeds/BranchSeeder.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Arr;
|
||||
use App\Services\BranchService;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class BranchSeeder extends Seeder
|
||||
{
|
||||
|
||||
private $branchService;
|
||||
|
||||
public function __construct(BranchService $branchService)
|
||||
{
|
||||
$this->branchService = $branchService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$branches = [
|
||||
"Begeleid wonen",
|
||||
"Forensische zorg",
|
||||
"Kinder- en jeugdpsychiatrie",
|
||||
"LVB-SGLVG",
|
||||
"mbo's en hbo's",
|
||||
"Specialistische ggz",
|
||||
"Verslavingszorg",
|
||||
"vLOGO",
|
||||
];
|
||||
|
||||
foreach ($branches as $branch) {
|
||||
|
||||
$new_branch = $this->branchService->save(['title' => $branch]);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
159
database/seeds/ChecklistSeeder.php
Normal file
159
database/seeds/ChecklistSeeder.php
Normal file
@@ -0,0 +1,159 @@
|
||||
<?php
|
||||
|
||||
use App\Services\ChecklistCategoryService;
|
||||
use App\Services\ChecklistService;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ChecklistSeeder extends Seeder
|
||||
{
|
||||
|
||||
private $checklistCategoryService;
|
||||
|
||||
public function __construct(
|
||||
ChecklistCategoryService $checklistCategoryService,
|
||||
ChecklistService $checklistService
|
||||
) {
|
||||
$this->checklistCategoryService = $checklistCategoryService;
|
||||
$this->checklistService = $checklistService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$checklists = [
|
||||
[
|
||||
'title' => 'Akkoord',
|
||||
'items' => [
|
||||
'Inhoudelijk',
|
||||
'Technisch',
|
||||
'Totaal'
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'Oplevering ontwikkelomgeving',
|
||||
'items' => [
|
||||
'Statusletter aanpassen',
|
||||
'Publiceren',
|
||||
'Extern ID aanpassen',
|
||||
'PE Online ID ingevuld',
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'Voor oplevering',
|
||||
'items' => [
|
||||
'Releasenote op support plaatsen',
|
||||
'Toetsvragen beveiligen',
|
||||
'Toetsvragen in productinfo op support plaatsen',
|
||||
'Productinfo (incl blauwdruk) op support plaatsen ',
|
||||
'Info voor catalogusproduct maken (tegeltekst n evt. toelichting)',
|
||||
'Implementatie-info op support plaatsen',
|
||||
'Akkoordmelding leverancier + versturen opleverdocument',
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'Beschikbaar stellen leden ontwikkelomgeving',
|
||||
'items' => [
|
||||
'Beschikbaar stellen in subomgeving van alle leden type A, B of C',
|
||||
'Beschikbaar stellen in subomgeving van alle leden type E',
|
||||
'Uitvoering maken en beschikbaar stellen in ‘inkijkexemplaar’',
|
||||
'Uitvoering en catalogusproduct maken en beschikbaar stellen in ‘leeromgeving voor derden’',
|
||||
'Beschikbaar stellen in subomgeving van leden type D en docentenomgeving',
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'Productcatalogus en -monitor',
|
||||
'items' => [
|
||||
'Productinfo plaatsen in productcatalogus',
|
||||
'Verplaatsen uit ’In ontwikkeling’',
|
||||
'Controleren of de juiste informatie is doorgevoerd in de productadministratie/ op support',
|
||||
'Evt. forumberichten onder ‘Leerproducten in ontwikkeling’ verplaatsen',
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'Communicatie',
|
||||
'items' => [
|
||||
'CLP nieuwsflits naar beheerders van subomgevingen en medewerkers GGZ Ecademy',
|
||||
'E-mail naar functioneel beheer scholen met -indien van toepassing- LTI gegevens',
|
||||
'Bericht voor infomail',
|
||||
'Bericht op site evt. SM',
|
||||
'Bericht in nieuwsbrief',
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'Blauwdruk en trailer',
|
||||
'items' => [
|
||||
'Aangepaste blauwdruk ontvangen',
|
||||
'Vragenlijst/ Voice-over trailer goedgekeurd',
|
||||
'Trailer ontvangen van leverancier',
|
||||
'Trailer plaatsen op mediasite',
|
||||
'Trailer plaatsen in product-catalogus van website',
|
||||
'Trailer plaatsen in catalogus van inkijkexemplaar in aNS',
|
||||
'Trailer in product-informatie op support',
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'Bestandsbeheer',
|
||||
'items' => [
|
||||
'Opleverdocument leverancier checken',
|
||||
'Ontvangen bronbestanden op de juiste plek neerzetten ',
|
||||
'Catalogus- en banner afbeelding',
|
||||
'SP-mappen opschonen',
|
||||
'Oude, niet gepubliceerde templates archiveren (uitvoeringen einddatum instellen)',
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'Accreditatie',
|
||||
'items' => [
|
||||
'Accreditatieinfo aanvragen + op een rij zetten',
|
||||
'Accreditatie-overzicht updaten',
|
||||
'Accreditatie-overzicht op support zetten',
|
||||
'Info over accreditatie toevoegen aan product-catalogus',
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'Na afloop',
|
||||
'items' => [
|
||||
'Terugkoppelen bevindingen naar melder',
|
||||
'Afhandelen bevindingen/ tickets in FD',
|
||||
'Evaluatie inplannen',
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($checklists as $checklist) {
|
||||
|
||||
// Create category
|
||||
$category = $this->checklistCategoryService->save(Arr::except($checklist, ['items']));
|
||||
|
||||
// Create checklist items to attach to that category
|
||||
if (isset($checklist['items'])) {
|
||||
|
||||
foreach ($checklist['items'] as $item) {
|
||||
|
||||
$data = [];
|
||||
|
||||
if (is_string($item)) {
|
||||
$data = [
|
||||
'title' => $item,
|
||||
'checklist_category_id' => $category->id
|
||||
];
|
||||
} elseif (Arr::isAssoc($item)) {
|
||||
|
||||
foreach ($item as $key => $value) {
|
||||
$data[$key] = $value;
|
||||
}
|
||||
|
||||
$data['checklist_category_id'] = $category->id;
|
||||
}
|
||||
|
||||
$new_checklist = $this->checklistService->save($data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
28
database/seeds/DatabaseSeeder.php
Normal file
28
database/seeds/DatabaseSeeder.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// Global Importer - call separately: php artisan db:seed --class=GlobalDbImportSeeder
|
||||
// $this->call(GlobalDbImportSeeder::class);
|
||||
|
||||
$this->call([
|
||||
ChecklistSeeder::class,
|
||||
RolesTableSeeder::class,
|
||||
UserSeeder::class,
|
||||
FilterSeeder::class,
|
||||
SynonymSeeder::class,
|
||||
LearningProductSeeder::class,
|
||||
MemberSeeder::class
|
||||
//BranchSeeder::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
163
database/seeds/FilterSeeder.php
Normal file
163
database/seeds/FilterSeeder.php
Normal file
@@ -0,0 +1,163 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Arr;
|
||||
use App\Services\FilterService;
|
||||
use App\Services\FilterItemService;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class FilterSeeder extends Seeder
|
||||
{
|
||||
|
||||
private $filterService;
|
||||
|
||||
public function __construct(
|
||||
FilterService $filterService,
|
||||
FilterItemService $filterItemService
|
||||
) {
|
||||
$this->filterService = $filterService;
|
||||
$this->filterItemService = $filterItemService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$filters = [
|
||||
[
|
||||
'title' => 'category',
|
||||
'items' => [
|
||||
'Ambulantisering', 'Forensisch', 'Geneesmiddelen en somatiek', 'Herstel', 'Methodieken', 'Professioneel handelen', 'Professionele attitude', 'Psychopathologie', 'Suïcidepreventie', 'Voorbehouden handelingen', 'Wetgeving'
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'audience',
|
||||
'items' => [
|
||||
'Aandachtsfunctionarissen', 'Agogen', 'Ambulant begeleider', 'Artsen', 'Behandelaren', 'Cognitief gedragstherapeuten', 'Cognitief gedragstherapeutisch werkers', 'ervaringsdeskundigen', 'ervaringswerkers',
|
||||
'gezondheidstherapeuten', 'groepsbegeleiders', 'groepswerkers', 'GZ psychologen', 'jongerenwerkers', 'klinisch psychologen', 'leerling verpleegkundigen', 'maatschappelijk werkers', 'orthopedagogen',
|
||||
'pedagogen', 'persoonlijk begeleiders', 'physician assistants', 'POH GGZ', 'psychiaters', 'psychologen', 'psychotherapeuten', 'schuldhulpverleners', 'sociaal pedagogisch hulpverleners', 'sociaal psychiatrisch verpleegkundigen',
|
||||
'social worker', 'sociotherapeuten', 'trainers', 'vaktherapeuten', 'verpleegkundig specialisten', 'verpleegkundigen', 'verzorgenden', 'woonbegeleiders', 'zorg behandel inrichtingswerkers'
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'format_version',
|
||||
'items' => [
|
||||
'option-A',
|
||||
'option-B',
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'course',
|
||||
'items' => [
|
||||
'Forensische leerlijn', 'LVB', 'Zichtbaar vakmanschap'
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'level',
|
||||
'items' => [
|
||||
'MBO', 'MBO 3/4', 'MBO 4', 'HBO', 'HBO+Master', 'WO', 'NLQF 6'
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'developers'
|
||||
],
|
||||
[
|
||||
'title' =>
|
||||
'dev_environment',
|
||||
'items' => [
|
||||
'aNS'
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'product_type',
|
||||
'items' => [
|
||||
'Leertraject'
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'made_by',
|
||||
'items' => [
|
||||
'Danaë'
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'register',
|
||||
'items' => [
|
||||
'ABAN', 'Accreditatiebureau Cluster 123', 'FGZpT', 'In aanvraag', 'Kwaliteitsregister POH-GGZ', 'Kwaliteitsregister Psychotherapie NVP', 'Kwaliteitsregister V&V', 'NIP A&O | NIP A&G', 'NIP Eerstelijnspsychologen', ' NIP Kinder- en Jeugdpsycholoog (K&J) / NVO Orthopedagoog-Generalist (OG)', 'NIP-Lichaamsgericht Werkend Psycholoog', 'NIP-Neurofeedbackpsycholoog', 'NIP-Psycholoog Mediator', 'nvt', 'NVvp', 'Register Vaktherapie', 'Registerplein', 'SKJ', 'Verpleegkundig Specialisten Register', 'VVGN'
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'status',
|
||||
'items' => [
|
||||
['title' => 'Geprioriteerd', 'color' => '#19DB7A'],
|
||||
['title' => 'In ontwikkeling', 'color' => '#F5AB00'],
|
||||
['title' => 'Opgeleverd', 'color' => '#31B8CE'],
|
||||
['title' => 'Test', 'color' => '#FFFF7E'],
|
||||
['title' => 'Vervallen - actief', 'color' => '#6F7782'],
|
||||
['title' => 'Vervallen - niet-actief', 'color' => '#000000'],
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'theme',
|
||||
'items' => [
|
||||
'Ambulantisering', 'Eigen regie', 'Medicatie bij psychiatrische aandoeningen', 'Meldcode Kindermishandeling en Kindcheck', 'Psychopathologie', 'Suïcidepreventie'
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'type',
|
||||
'items' => [
|
||||
[
|
||||
'title' => 'GGZ-instellingen',
|
||||
// 'subtitle' => 'type A,B,C'
|
||||
],
|
||||
[
|
||||
'title' => 'Scholen',
|
||||
// 'subtitle' => 'type D'
|
||||
],
|
||||
[
|
||||
'title' => 'vLOGO onderwijs',
|
||||
// 'subtitle' => 'type E'
|
||||
],
|
||||
'Gratis'
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'quality_standards',
|
||||
'items' => [
|
||||
'option_1',
|
||||
'option_2',
|
||||
'option_3',
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($filters as $filter) {
|
||||
|
||||
$new_filter = $this->filterService->save(Arr::except($filter, ['items']));
|
||||
|
||||
if (isset($filter['items'])) {
|
||||
|
||||
foreach ($filter['items'] as $item) {
|
||||
|
||||
$data = [];
|
||||
|
||||
if (is_string($item)) {
|
||||
$data = [
|
||||
'title' => $item,
|
||||
'filter_id' => $new_filter->id
|
||||
];
|
||||
} elseif (Arr::isAssoc($item)) {
|
||||
foreach ($item as $key => $value) {
|
||||
$data[$key] = $value;
|
||||
}
|
||||
$data['filter_id'] = $new_filter->id;
|
||||
}
|
||||
|
||||
$new_filter_item = $this->filterItemService->save($data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
82
database/seeds/GlobalDbImportSeeder.php
Normal file
82
database/seeds/GlobalDbImportSeeder.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class GlobalDbImportSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
public function run()
|
||||
{
|
||||
/**
|
||||
* Notes from last import:
|
||||
*
|
||||
* - json got by mysql workbench
|
||||
* - sorting made manually inside the json
|
||||
* - storage folder moved manually
|
||||
* - media sql table imported in local from old db
|
||||
* - after finished, exported the entire db and imported
|
||||
*
|
||||
* */
|
||||
|
||||
//
|
||||
$db = json_decode(file_get_contents(resource_path('data/mijnggz.json')), true);
|
||||
|
||||
if (empty($db)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$tables = array_keys($db);
|
||||
|
||||
$sortOrder = [
|
||||
'addresses',
|
||||
'checklist_categories',
|
||||
'checklists',
|
||||
'users',
|
||||
'roles',
|
||||
'role_user',
|
||||
'synonyms',
|
||||
'learning_products',
|
||||
'versions',
|
||||
'contact_persons',
|
||||
'course_notifications',
|
||||
'failed_jobs',
|
||||
'filters',
|
||||
'filter_items',
|
||||
'filter_items_associations',
|
||||
'learning_product_synonym',
|
||||
'media',
|
||||
'member_employees',
|
||||
'members',
|
||||
'migrations',
|
||||
'notifications',
|
||||
'password_resets',
|
||||
'personal_access_tokens',
|
||||
'websockets_statistics_entries',
|
||||
'accreditations',
|
||||
'checklist_versions',
|
||||
];
|
||||
|
||||
$sortedTables = [];
|
||||
|
||||
$skippable = [
|
||||
'migrations',
|
||||
'course_notifications',
|
||||
'media',
|
||||
];
|
||||
|
||||
foreach ($db as $key => $value) {
|
||||
|
||||
if (!in_array($key, $skippable)) {
|
||||
DB::table($key)->insert($value);
|
||||
}
|
||||
}
|
||||
|
||||
$this->call(BranchSeeder::class);
|
||||
}
|
||||
}
|
||||
8169
database/seeds/LearningProductSeeder.php
Normal file
8169
database/seeds/LearningProductSeeder.php
Normal file
File diff suppressed because it is too large
Load Diff
2113
database/seeds/MemberSeeder.php
Normal file
2113
database/seeds/MemberSeeder.php
Normal file
File diff suppressed because it is too large
Load Diff
21
database/seeds/RolesTableSeeder.php
Normal file
21
database/seeds/RolesTableSeeder.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use App\Repositories\Role;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class RolesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// Role::truncate();
|
||||
Role::create(['name' => 'admin', 'color' => 'error']);
|
||||
Role::create(['name' => 'operator', 'color' => 'warning']);
|
||||
Role::create(['name' => 'user', 'color' => 'grey']);
|
||||
Role::create(['name' => 'member', 'color' => 'blue']);
|
||||
}
|
||||
}
|
||||
31
database/seeds/SynonymSeeder.php
Normal file
31
database/seeds/SynonymSeeder.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Services\SynonymService;
|
||||
|
||||
class SynonymSeeder extends Seeder
|
||||
{
|
||||
|
||||
private $synonymService;
|
||||
|
||||
public function __construct(SynonymService $synonymService)
|
||||
{
|
||||
$this->synonymService = $synonymService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$synonyms = ['Medicijnen', 'Medicatie', 'Therapie', 'Remedie'];
|
||||
|
||||
foreach ($synonyms as $synonym) {
|
||||
|
||||
$data = ['title' => $synonym];
|
||||
$this->synonymService->save($data);
|
||||
}
|
||||
}
|
||||
}
|
||||
170
database/seeds/UserSeeder.php
Normal file
170
database/seeds/UserSeeder.php
Normal file
@@ -0,0 +1,170 @@
|
||||
<?php
|
||||
|
||||
use App\Repositories\Role;
|
||||
use App\Services\UserService;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Notifications\CustomNotification;
|
||||
|
||||
class UserSeeder extends Seeder
|
||||
{
|
||||
|
||||
private $userService;
|
||||
|
||||
public function __construct(UserService $userService)
|
||||
{
|
||||
$this->userService = $userService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// $this->userService->truncate();
|
||||
// DB::table('role_user')->truncate();
|
||||
|
||||
$adminRole = Role::where('name', 'admin')->first();
|
||||
$operatorRole = Role::where('name', 'operator')->first();
|
||||
$userRole = Role::where('name', 'user')->first();
|
||||
|
||||
// $demo_notification = new CustomNotification('Subject', 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab dolores libero at dolorem unde, consequuntur sed eveniet totam aperiam aspernatur.');
|
||||
|
||||
$admin = factory(App\Repositories\User::class)->create([
|
||||
'first_name' => 'Kees',
|
||||
'last_name' => 'van de Wal',
|
||||
'email' => 'kees@ggzecademy.nl',
|
||||
'password' => bcrypt('password'),
|
||||
]);
|
||||
|
||||
// $url = asset('images/kees.png');
|
||||
$url = 'https://ggzecademy.nl/web/uploads/2019/02/MG_5728-kees2.jpg';
|
||||
|
||||
// $admin->addMediaFromUrl($url)->toMediaCollection('profile_pics');
|
||||
|
||||
$admin->roles()->sync([
|
||||
$adminRole->id,
|
||||
$operatorRole->id,
|
||||
$userRole->id
|
||||
]);
|
||||
|
||||
// $admin->notify($demo_notification);
|
||||
|
||||
$admin = factory(App\Repositories\User::class)->create([
|
||||
'first_name' => 'Maaike',
|
||||
'last_name' => 'Frumau',
|
||||
'email' => 'maaike@3110.nl',
|
||||
'password' => bcrypt('password'),
|
||||
]);
|
||||
|
||||
$admin->roles()->sync([
|
||||
$adminRole->id,
|
||||
$operatorRole->id,
|
||||
$userRole->id
|
||||
]);
|
||||
|
||||
// $admin->notify($demo_notification);
|
||||
|
||||
$admin = factory(App\Repositories\User::class)->create([
|
||||
'first_name' => 'Yongqing',
|
||||
'last_name' => 'Wang',
|
||||
'email' => 'yongqing@3110.nl',
|
||||
'password' => bcrypt('password'),
|
||||
]);
|
||||
|
||||
$admin->roles()->sync([
|
||||
$adminRole->id,
|
||||
$operatorRole->id,
|
||||
$userRole->id
|
||||
]);
|
||||
|
||||
// $admin->notify($demo_notification);
|
||||
|
||||
$admin = factory(App\Repositories\User::class)->create([
|
||||
'first_name' => 'Ingrid',
|
||||
'last_name' => 'Meuwissen',
|
||||
'email' => 'ingridmeuwissen@ggzecademy.nl',
|
||||
'password' => bcrypt('password'),
|
||||
]);
|
||||
|
||||
$admin->roles()->sync([
|
||||
$adminRole->id,
|
||||
$operatorRole->id,
|
||||
$userRole->id
|
||||
]);
|
||||
|
||||
// $admin->notify($demo_notification);
|
||||
|
||||
$operator = factory(App\Repositories\User::class)->create([
|
||||
'first_name' => 'Ingrid',
|
||||
'last_name' => 'van Dijck',
|
||||
'email' => 'ingridvandijck@ggzecademy.nl',
|
||||
'password' => bcrypt('password'),
|
||||
]);
|
||||
|
||||
// $operator->notify($demo_notification);
|
||||
|
||||
$operator->roles()->sync([
|
||||
$operatorRole->id,
|
||||
$userRole->id
|
||||
]);
|
||||
|
||||
$operator = factory(App\Repositories\User::class)->create([
|
||||
'first_name' => 'Margreet',
|
||||
'last_name' => 'Botter',
|
||||
'email' => 'margreet@ggzecademy.nl',
|
||||
'password' => bcrypt('password'),
|
||||
]);
|
||||
|
||||
// $operator->notify($demo_notification);
|
||||
|
||||
$operator->roles()->sync([
|
||||
$operatorRole->id,
|
||||
$userRole->id
|
||||
]);
|
||||
|
||||
$operator = factory(App\Repositories\User::class)->create([
|
||||
'first_name' => 'Marjolijn',
|
||||
'last_name' => 'Tijsmans',
|
||||
'email' => 'marjolijn@ggzecademy.nl',
|
||||
'password' => bcrypt('password'),
|
||||
]);
|
||||
|
||||
// $operator->notify($demo_notification);
|
||||
|
||||
$operator->roles()->sync([
|
||||
$operatorRole->id,
|
||||
$userRole->id
|
||||
]);
|
||||
|
||||
$user = factory(App\Repositories\User::class)->create([
|
||||
'first_name' => 'Inge',
|
||||
'last_name' => 'Jansen',
|
||||
'email' => 'inge@ggzecademy.nl',
|
||||
'password' => bcrypt('password'),
|
||||
]);
|
||||
|
||||
// $user->notify($demo_notification);
|
||||
|
||||
// $url = asset('images/inge.jpeg');
|
||||
|
||||
//$user->addMediaFromUrl($url)->toMediaCollection('profile_pics');
|
||||
|
||||
$user->roles()->sync([
|
||||
$userRole->id
|
||||
]);
|
||||
|
||||
|
||||
/**
|
||||
* Creates a fake user
|
||||
*/
|
||||
|
||||
// factory(App\Repositories\User::class, 1)
|
||||
// ->create()
|
||||
// ->each(function ($user) use ($userRole) {
|
||||
// $user->roles()->attach($userRole);
|
||||
// });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user