Skip to content

Commit

Permalink
adds companies to searchable
Browse files Browse the repository at this point in the history
  • Loading branch information
aocneanu committed Oct 14, 2018
1 parent c6f1222 commit 4acd183
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions config/enso/searchable.php
Expand Up @@ -3,6 +3,7 @@
use LaravelEnso\Teams\app\Models\Team;
use LaravelEnso\People\app\Models\Person;
use LaravelEnso\Contacts\app\Models\Contact;
use LaravelEnso\Companies\app\Models\Company;
use LaravelEnso\HowToVideos\app\Models\Video;

return [
Expand All @@ -20,6 +21,12 @@
'label' => 'name',
'permissionGroup' => 'administration.people',
],
Company::class => [
'group' => 'Company',
'attributes' => ['name'],
'label' => 'name',
'permissionGroup' => 'administration.companies',
],
Team::class => [
'group' => 'Team',
'attributes' => ['name'],
Expand Down
8 changes: 4 additions & 4 deletions database/seeds/RoleSeeder.php
Expand Up @@ -21,17 +21,17 @@ public function run()
$admin = $roles->first();

$admin->permissions()
->attach(Permission::all());
->sync(Permission::pluck('id'));

$admin->menus()
->attach(Menu::all());
->sync(Menu::pluck('id'));

$supervisor = $roles->last();

$supervisor->permissions()
->attach(Permission::implicit()->get());
->sync(Permission::implicit()->pluck('id'));

$supervisor->menus()
->attach(Menu::all());
->sync(Menu::pluck('id'));
}
}

0 comments on commit 4acd183

Please sign in to comment.