-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9fb066
commit 55e460f
Showing
16 changed files
with
296 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
<?php | ||
|
||
namespace Anibalealvarezs\Projectbuilder\Controllers\Permission; | ||
|
||
use Illuminate\Http\Request; | ||
use App\Http\Requests; | ||
use App\Http\Controllers\Controller; | ||
use Illuminate\Support\Facades\Storage; | ||
|
||
use Auth; | ||
use DB; | ||
|
||
//Importing laravel-permission models | ||
use Spatie\Permission\Models\Role; | ||
use Spatie\Permission\Models\Permission; | ||
|
||
use Session; | ||
|
||
class PbPermissionController extends Controller | ||
{ | ||
public function __construct() { | ||
// $this->middleware(['auth', 'isAdmin']); //isAdmin middleware lets only users with a //specific permission permission to access these resources | ||
} | ||
} | ||
<?php | ||
|
||
namespace Anibalealvarezs\Projectbuilder\Controllers\Permission; | ||
|
||
use Illuminate\Http\Request; | ||
use App\Http\Requests; | ||
use App\Http\Controllers\Controller; | ||
use Illuminate\Support\Facades\Storage; | ||
|
||
use Auth; | ||
use DB; | ||
|
||
//Importing laravel-permission models | ||
use Spatie\Permission\Models\Role; | ||
use Spatie\Permission\Models\Permission; | ||
|
||
use Session; | ||
|
||
class PbPermissionController extends Controller | ||
{ | ||
public function __construct() { | ||
// $this->middleware(['auth', 'isAdmin']); //isAdmin middleware lets only users with a //specific permission permission to access these resources | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
<?php | ||
|
||
namespace Anibalealvarezs\Projectbuilder\Controllers\Permission; | ||
|
||
use Illuminate\Http\Request; | ||
use App\Http\Requests; | ||
use App\Http\Controllers\Controller; | ||
use Illuminate\Support\Facades\Storage; | ||
|
||
use Auth; | ||
use DB; | ||
|
||
//Importing laravel-permission models | ||
use Spatie\Permission\Models\Role; | ||
use Spatie\Permission\Models\Permission; | ||
|
||
use Session; | ||
|
||
class PbRoleController extends Controller | ||
{ | ||
public function __construct() { | ||
// $this->middleware(['auth', 'isAdmin']);//isAdmin middleware lets only users with a //specific permission permission to access these resources | ||
} | ||
} | ||
<?php | ||
|
||
namespace Anibalealvarezs\Projectbuilder\Controllers\Permission; | ||
|
||
use Illuminate\Http\Request; | ||
use App\Http\Requests; | ||
use App\Http\Controllers\Controller; | ||
use Illuminate\Support\Facades\Storage; | ||
|
||
use Auth; | ||
use DB; | ||
|
||
//Importing laravel-permission models | ||
use Spatie\Permission\Models\Role; | ||
use Spatie\Permission\Models\Permission; | ||
|
||
use Session; | ||
|
||
class PbRoleController extends Controller | ||
{ | ||
public function __construct() { | ||
// $this->middleware(['auth', 'isAdmin']);//isAdmin middleware lets only users with a //specific permission permission to access these resources | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace Anibalealvarezs\Projectbuilder\Database\Seeders; | ||
|
||
use Illuminate\Database\Seeder; | ||
use App\Models\Team; | ||
|
||
//Enables us to output flash messaging | ||
use Session; | ||
|
||
class PbTeamSeeder extends Seeder | ||
{ | ||
/** | ||
* Run the database seeds. | ||
* | ||
* @return void | ||
*/ | ||
public function run() | ||
{ | ||
// Super Admin | ||
$team = new Team(); | ||
$team->name = 'SuperAdmin'; | ||
$team->personal_team = 1; | ||
$team->user_id = 1; | ||
$team->save(); | ||
|
||
// Admin | ||
$team = new Team(); | ||
$team->name = 'Admin'; | ||
$team->personal_team = 1; | ||
$team->user_id = 1; | ||
$team->save(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
use Illuminate\Database\Seeder; | ||
use Anibalealvarezs\Projectbuilder\Models\PbUser as User; | ||
use Illuminate\Support\Facades\Config; | ||
use Spatie\Permission\Models\Role; | ||
use Spatie\Permission\Models\Permission; | ||
use Illuminate\Support\Facades\Hash; | ||
|
@@ -22,18 +23,20 @@ public function run() | |
{ | ||
// anibalealvarezs | ||
$user = new User(); | ||
$user->password = Hash::make('NoEntiendo2321'); | ||
$user->password = Hash::make('NoEntiendo2321', Config::get('hashing.'.Config::get('hashing.driver'))); | ||
$user->email = '[email protected]'; | ||
$user->name = 'Aníbal Álvarez'; | ||
$user->current_team_id = 1; | ||
$user->save(); | ||
// SuperAdmin | ||
$user->assignRole('super-admin'); | ||
|
||
// client | ||
$user = new User(); | ||
$user->password = Hash::make('Client321'); | ||
$user->email = 'client@client'; | ||
$user->name = 'Client'; | ||
$user->password = Hash::make('Client321', Config::get('hashing.'.Config::get('hashing.driver'))); | ||
$user->email = 'Admin@admin'; | ||
$user->name = 'Admin'; | ||
$user->current_team_id = 2; | ||
$user->save(); | ||
// Admin | ||
$user->assignRole('admin'); | ||
|
Oops, something went wrong.