WIP: Road to 1.0.0 #1

Draft
miguel456 wants to merge 123 commits from develop into master
2 changed files with 17 additions and 9 deletions
Showing only changes of commit bc8570019c - Show all commits

View File

@ -22,11 +22,13 @@
namespace Database\Seeders; namespace Database\Seeders;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
use Illuminate\Support\Collection;
use Spatie\Permission\Models\Permission; use Spatie\Permission\Models\Permission;
use Spatie\Permission\Models\Role; use Spatie\Permission\Models\Role;
class TeamSeeder extends Seeder class TeamSeeder extends Seeder
{ {
/** /**
* Run the database seeds. * Run the database seeds.
* *
@ -54,13 +56,23 @@ class TeamSeeder extends Seeder
$admin = Role::where('name', 'admin')->first(); $admin = Role::where('name', 'admin')->first();
$reviewer = Role::where('name', 'reviewer')->first(); $reviewer = Role::where('name', 'reviewer')->first();
foreach($teamPermissions as $permission) foreach($teamPermissions as $permission)
{ {
foreach ($teamUserPermissions as $userPermission) foreach ($teamUserPermissions as $userPermission)
{ {
Permission::create(['name' => $permission]); $permCheck = Permission::where('name', $permission)->get()->all();
Permission::create(['name' => $userPermission]);
if (empty($permCheck))
{
Permission::create(['name' => $permission]);
}
$userPermCheck = Permission::where('name', $userPermission)->get()->all();
if (empty($userPermCheck))
{
Permission::create(['name' => $userPermission]);
}
} }
} }
@ -68,9 +80,5 @@ class TeamSeeder extends Seeder
$reviewer->givePermissionTo($teamUserPermissions); $reviewer->givePermissionTo($teamUserPermissions);
} }
} }

View File

@ -12,7 +12,7 @@
<!-- Scripts --> <!-- Scripts -->
<script src="{{ asset('js/app.js') }}" defer></script> <script src="{{ asset('js/app.js') }}" defer></script>
<!-- Fonts --> <!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com"> <link rel="dns-prefetch" href="//fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
@ -25,7 +25,7 @@
<nav class="navbar navbar-expand-md navbar-dark navbar-style shadow-sm"> <nav class="navbar navbar-expand-md navbar-dark navbar-style shadow-sm">
<div class="container"> <div class="container">
<a class="navbar-brand" href="{{ url('/') }}"> <a class="navbar-brand" href="{{ url('/') }}">
Raspberry Network {{ config('app.name') }}
</a> </a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>