@@ -6,112 +6,112 @@ |
||
| 6 | 6 | |
| 7 | 7 | class UsersTableSeeder extends Seeder |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the database seeds. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function run() |
|
| 15 | - { |
|
| 16 | - /** |
|
| 17 | - * Insert the permissions related to users table. |
|
| 18 | - */ |
|
| 19 | - \DB::table('permissions')->insert( |
|
| 20 | - [ |
|
| 21 | - /** |
|
| 22 | - * Users model permissions. |
|
| 23 | - */ |
|
| 24 | - [ |
|
| 25 | - 'name' => 'save', |
|
| 26 | - 'model' => 'users', |
|
| 27 | - 'created_at' => \DB::raw('NOW()'), |
|
| 28 | - 'updated_at' => \DB::raw('NOW()') |
|
| 29 | - ], |
|
| 30 | - [ |
|
| 31 | - 'name' => 'delete', |
|
| 32 | - 'model' => 'users', |
|
| 33 | - 'created_at' => \DB::raw('NOW()'), |
|
| 34 | - 'updated_at' => \DB::raw('NOW()') |
|
| 35 | - ], |
|
| 36 | - [ |
|
| 37 | - 'name' => 'find', |
|
| 38 | - 'model' => 'users', |
|
| 39 | - 'created_at' => \DB::raw('NOW()'), |
|
| 40 | - 'updated_at' => \DB::raw('NOW()') |
|
| 41 | - ], |
|
| 42 | - [ |
|
| 43 | - 'name' => 'list', |
|
| 44 | - 'model' => 'users', |
|
| 45 | - 'created_at' => \DB::raw('NOW()'), |
|
| 46 | - 'updated_at' => \DB::raw('NOW()') |
|
| 47 | - ], |
|
| 48 | - [ |
|
| 49 | - 'name' => 'search', |
|
| 50 | - 'model' => 'users', |
|
| 51 | - 'created_at' => \DB::raw('NOW()'), |
|
| 52 | - 'updated_at' => \DB::raw('NOW()') |
|
| 53 | - ], |
|
| 54 | - [ |
|
| 55 | - 'name' => 'findby', |
|
| 56 | - 'model' => 'users', |
|
| 57 | - 'created_at' => \DB::raw('NOW()'), |
|
| 58 | - 'updated_at' => \DB::raw('NOW()') |
|
| 59 | - ], |
|
| 60 | - [ |
|
| 61 | - 'name' => 'first', |
|
| 62 | - 'model' => 'users', |
|
| 63 | - 'created_at' => \DB::raw('NOW()'), |
|
| 64 | - 'updated_at' => \DB::raw('NOW()') |
|
| 65 | - ], |
|
| 66 | - [ |
|
| 67 | - 'name' => 'paginate', |
|
| 68 | - 'model' => 'users', |
|
| 69 | - 'created_at' => \DB::raw('NOW()'), |
|
| 70 | - 'updated_at' => \DB::raw('NOW()') |
|
| 71 | - ], |
|
| 72 | - [ |
|
| 73 | - 'name' => 'paginateby', |
|
| 74 | - 'model' => 'users', |
|
| 75 | - 'created_at' => \DB::raw('NOW()'), |
|
| 76 | - 'updated_at' => \DB::raw('NOW()') |
|
| 77 | - ], |
|
| 78 | - [ |
|
| 79 | - 'name' => 'assigngroups', |
|
| 80 | - 'model' => 'users', |
|
| 81 | - 'created_at' => \DB::raw('NOW()'), |
|
| 82 | - 'updated_at' => \DB::raw('NOW()') |
|
| 83 | - ], |
|
| 84 | - [ |
|
| 85 | - 'name' => 'block', |
|
| 86 | - 'model' => 'users', |
|
| 87 | - 'created_at' => \DB::raw('NOW()'), |
|
| 88 | - 'updated_at' => \DB::raw('NOW()') |
|
| 89 | - ], |
|
| 90 | - [ |
|
| 91 | - 'name' => 'unblock', |
|
| 92 | - 'model' => 'users', |
|
| 93 | - 'created_at' => \DB::raw('NOW()'), |
|
| 94 | - 'updated_at' => \DB::raw('NOW()') |
|
| 95 | - ], |
|
| 96 | - [ |
|
| 97 | - 'name' => 'group', |
|
| 98 | - 'model' => 'users', |
|
| 99 | - 'created_at' => \DB::raw('NOW()'), |
|
| 100 | - 'updated_at' => \DB::raw('NOW()') |
|
| 101 | - ], |
|
| 102 | - [ |
|
| 103 | - 'name' => 'deleted', |
|
| 104 | - 'model' => 'users', |
|
| 105 | - 'created_at' => \DB::raw('NOW()'), |
|
| 106 | - 'updated_at' => \DB::raw('NOW()') |
|
| 107 | - ], |
|
| 108 | - [ |
|
| 109 | - 'name' => 'restore', |
|
| 110 | - 'model' => 'users', |
|
| 111 | - 'created_at' => \DB::raw('NOW()'), |
|
| 112 | - 'updated_at' => \DB::raw('NOW()') |
|
| 113 | - ] |
|
| 114 | - ] |
|
| 115 | - ); |
|
| 116 | - } |
|
| 9 | + /** |
|
| 10 | + * Run the database seeds. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function run() |
|
| 15 | + { |
|
| 16 | + /** |
|
| 17 | + * Insert the permissions related to users table. |
|
| 18 | + */ |
|
| 19 | + \DB::table('permissions')->insert( |
|
| 20 | + [ |
|
| 21 | + /** |
|
| 22 | + * Users model permissions. |
|
| 23 | + */ |
|
| 24 | + [ |
|
| 25 | + 'name' => 'save', |
|
| 26 | + 'model' => 'users', |
|
| 27 | + 'created_at' => \DB::raw('NOW()'), |
|
| 28 | + 'updated_at' => \DB::raw('NOW()') |
|
| 29 | + ], |
|
| 30 | + [ |
|
| 31 | + 'name' => 'delete', |
|
| 32 | + 'model' => 'users', |
|
| 33 | + 'created_at' => \DB::raw('NOW()'), |
|
| 34 | + 'updated_at' => \DB::raw('NOW()') |
|
| 35 | + ], |
|
| 36 | + [ |
|
| 37 | + 'name' => 'find', |
|
| 38 | + 'model' => 'users', |
|
| 39 | + 'created_at' => \DB::raw('NOW()'), |
|
| 40 | + 'updated_at' => \DB::raw('NOW()') |
|
| 41 | + ], |
|
| 42 | + [ |
|
| 43 | + 'name' => 'list', |
|
| 44 | + 'model' => 'users', |
|
| 45 | + 'created_at' => \DB::raw('NOW()'), |
|
| 46 | + 'updated_at' => \DB::raw('NOW()') |
|
| 47 | + ], |
|
| 48 | + [ |
|
| 49 | + 'name' => 'search', |
|
| 50 | + 'model' => 'users', |
|
| 51 | + 'created_at' => \DB::raw('NOW()'), |
|
| 52 | + 'updated_at' => \DB::raw('NOW()') |
|
| 53 | + ], |
|
| 54 | + [ |
|
| 55 | + 'name' => 'findby', |
|
| 56 | + 'model' => 'users', |
|
| 57 | + 'created_at' => \DB::raw('NOW()'), |
|
| 58 | + 'updated_at' => \DB::raw('NOW()') |
|
| 59 | + ], |
|
| 60 | + [ |
|
| 61 | + 'name' => 'first', |
|
| 62 | + 'model' => 'users', |
|
| 63 | + 'created_at' => \DB::raw('NOW()'), |
|
| 64 | + 'updated_at' => \DB::raw('NOW()') |
|
| 65 | + ], |
|
| 66 | + [ |
|
| 67 | + 'name' => 'paginate', |
|
| 68 | + 'model' => 'users', |
|
| 69 | + 'created_at' => \DB::raw('NOW()'), |
|
| 70 | + 'updated_at' => \DB::raw('NOW()') |
|
| 71 | + ], |
|
| 72 | + [ |
|
| 73 | + 'name' => 'paginateby', |
|
| 74 | + 'model' => 'users', |
|
| 75 | + 'created_at' => \DB::raw('NOW()'), |
|
| 76 | + 'updated_at' => \DB::raw('NOW()') |
|
| 77 | + ], |
|
| 78 | + [ |
|
| 79 | + 'name' => 'assigngroups', |
|
| 80 | + 'model' => 'users', |
|
| 81 | + 'created_at' => \DB::raw('NOW()'), |
|
| 82 | + 'updated_at' => \DB::raw('NOW()') |
|
| 83 | + ], |
|
| 84 | + [ |
|
| 85 | + 'name' => 'block', |
|
| 86 | + 'model' => 'users', |
|
| 87 | + 'created_at' => \DB::raw('NOW()'), |
|
| 88 | + 'updated_at' => \DB::raw('NOW()') |
|
| 89 | + ], |
|
| 90 | + [ |
|
| 91 | + 'name' => 'unblock', |
|
| 92 | + 'model' => 'users', |
|
| 93 | + 'created_at' => \DB::raw('NOW()'), |
|
| 94 | + 'updated_at' => \DB::raw('NOW()') |
|
| 95 | + ], |
|
| 96 | + [ |
|
| 97 | + 'name' => 'group', |
|
| 98 | + 'model' => 'users', |
|
| 99 | + 'created_at' => \DB::raw('NOW()'), |
|
| 100 | + 'updated_at' => \DB::raw('NOW()') |
|
| 101 | + ], |
|
| 102 | + [ |
|
| 103 | + 'name' => 'deleted', |
|
| 104 | + 'model' => 'users', |
|
| 105 | + 'created_at' => \DB::raw('NOW()'), |
|
| 106 | + 'updated_at' => \DB::raw('NOW()') |
|
| 107 | + ], |
|
| 108 | + [ |
|
| 109 | + 'name' => 'restore', |
|
| 110 | + 'model' => 'users', |
|
| 111 | + 'created_at' => \DB::raw('NOW()'), |
|
| 112 | + 'updated_at' => \DB::raw('NOW()') |
|
| 113 | + ] |
|
| 114 | + ] |
|
| 115 | + ); |
|
| 116 | + } |
|
| 117 | 117 | } |
@@ -6,27 +6,27 @@ |
||
| 6 | 6 | |
| 7 | 7 | class AssignRelationsSeeder extends Seeder |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the database seeds. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function run() |
|
| 15 | - { |
|
| 16 | - $adminGroupId = \DB::table('groups')->where('name', 'admin')->select('id')->first()->id; |
|
| 9 | + /** |
|
| 10 | + * Run the database seeds. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function run() |
|
| 15 | + { |
|
| 16 | + $adminGroupId = \DB::table('groups')->where('name', 'admin')->select('id')->first()->id; |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Assign the permissions to the admin group. |
|
| 20 | - */ |
|
| 21 | - \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['users', 'permissions', 'groups', 'oauthClients'])->each(function ($permission) use ($adminGroupId) { |
|
| 22 | - \DB::table('groups_permissions')->insert( |
|
| 23 | - [ |
|
| 24 | - 'permission_id' => $permission->id, |
|
| 25 | - 'group_id' => $adminGroupId, |
|
| 26 | - 'created_at' => \DB::raw('NOW()'), |
|
| 27 | - 'updated_at' => \DB::raw('NOW()') |
|
| 28 | - ] |
|
| 29 | - ); |
|
| 30 | - }); |
|
| 31 | - } |
|
| 18 | + /** |
|
| 19 | + * Assign the permissions to the admin group. |
|
| 20 | + */ |
|
| 21 | + \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['users', 'permissions', 'groups', 'oauthClients'])->each(function ($permission) use ($adminGroupId) { |
|
| 22 | + \DB::table('groups_permissions')->insert( |
|
| 23 | + [ |
|
| 24 | + 'permission_id' => $permission->id, |
|
| 25 | + 'group_id' => $adminGroupId, |
|
| 26 | + 'created_at' => \DB::raw('NOW()'), |
|
| 27 | + 'updated_at' => \DB::raw('NOW()') |
|
| 28 | + ] |
|
| 29 | + ); |
|
| 30 | + }); |
|
| 31 | + } |
|
| 32 | 32 | } |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | /** |
| 19 | 19 | * Assign the permissions to the admin group. |
| 20 | 20 | */ |
| 21 | - \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['users', 'permissions', 'groups', 'oauthClients'])->each(function ($permission) use ($adminGroupId) { |
|
| 21 | + \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['users', 'permissions', 'groups', 'oauthClients'])->each(function($permission) use ($adminGroupId) { |
|
| 22 | 22 | \DB::table('groups_permissions')->insert( |
| 23 | 23 | [ |
| 24 | 24 | 'permission_id' => $permission->id, |
@@ -6,64 +6,64 @@ |
||
| 6 | 6 | |
| 7 | 7 | class PermissionsTableSeeder extends Seeder |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the database seeds. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function run() |
|
| 15 | - { |
|
| 16 | - /** |
|
| 17 | - * Insert the permissions related to permissions table. |
|
| 18 | - */ |
|
| 19 | - \DB::table('permissions')->insert( |
|
| 20 | - [ |
|
| 21 | - /** |
|
| 22 | - * Permissions model permissions. |
|
| 23 | - */ |
|
| 24 | - [ |
|
| 25 | - 'name' => 'find', |
|
| 26 | - 'model' => 'permissions', |
|
| 27 | - 'created_at' => \DB::raw('NOW()'), |
|
| 28 | - 'updated_at' => \DB::raw('NOW()') |
|
| 29 | - ], |
|
| 30 | - [ |
|
| 31 | - 'name' => 'search', |
|
| 32 | - 'model' => 'permissions', |
|
| 33 | - 'created_at' => \DB::raw('NOW()'), |
|
| 34 | - 'updated_at' => \DB::raw('NOW()') |
|
| 35 | - ], |
|
| 36 | - [ |
|
| 37 | - 'name' => 'list', |
|
| 38 | - 'model' => 'permissions', |
|
| 39 | - 'created_at' => \DB::raw('NOW()'), |
|
| 40 | - 'updated_at' => \DB::raw('NOW()') |
|
| 41 | - ], |
|
| 42 | - [ |
|
| 43 | - 'name' => 'findby', |
|
| 44 | - 'model' => 'permissions', |
|
| 45 | - 'created_at' => \DB::raw('NOW()'), |
|
| 46 | - 'updated_at' => \DB::raw('NOW()') |
|
| 47 | - ], |
|
| 48 | - [ |
|
| 49 | - 'name' => 'first', |
|
| 50 | - 'model' => 'permissions', |
|
| 51 | - 'created_at' => \DB::raw('NOW()'), |
|
| 52 | - 'updated_at' => \DB::raw('NOW()') |
|
| 53 | - ], |
|
| 54 | - [ |
|
| 55 | - 'name' => 'paginate', |
|
| 56 | - 'model' => 'permissions', |
|
| 57 | - 'created_at' => \DB::raw('NOW()'), |
|
| 58 | - 'updated_at' => \DB::raw('NOW()') |
|
| 59 | - ], |
|
| 60 | - [ |
|
| 61 | - 'name' => 'paginateby', |
|
| 62 | - 'model' => 'permissions', |
|
| 63 | - 'created_at' => \DB::raw('NOW()'), |
|
| 64 | - 'updated_at' => \DB::raw('NOW()') |
|
| 65 | - ] |
|
| 66 | - ] |
|
| 67 | - ); |
|
| 68 | - } |
|
| 9 | + /** |
|
| 10 | + * Run the database seeds. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function run() |
|
| 15 | + { |
|
| 16 | + /** |
|
| 17 | + * Insert the permissions related to permissions table. |
|
| 18 | + */ |
|
| 19 | + \DB::table('permissions')->insert( |
|
| 20 | + [ |
|
| 21 | + /** |
|
| 22 | + * Permissions model permissions. |
|
| 23 | + */ |
|
| 24 | + [ |
|
| 25 | + 'name' => 'find', |
|
| 26 | + 'model' => 'permissions', |
|
| 27 | + 'created_at' => \DB::raw('NOW()'), |
|
| 28 | + 'updated_at' => \DB::raw('NOW()') |
|
| 29 | + ], |
|
| 30 | + [ |
|
| 31 | + 'name' => 'search', |
|
| 32 | + 'model' => 'permissions', |
|
| 33 | + 'created_at' => \DB::raw('NOW()'), |
|
| 34 | + 'updated_at' => \DB::raw('NOW()') |
|
| 35 | + ], |
|
| 36 | + [ |
|
| 37 | + 'name' => 'list', |
|
| 38 | + 'model' => 'permissions', |
|
| 39 | + 'created_at' => \DB::raw('NOW()'), |
|
| 40 | + 'updated_at' => \DB::raw('NOW()') |
|
| 41 | + ], |
|
| 42 | + [ |
|
| 43 | + 'name' => 'findby', |
|
| 44 | + 'model' => 'permissions', |
|
| 45 | + 'created_at' => \DB::raw('NOW()'), |
|
| 46 | + 'updated_at' => \DB::raw('NOW()') |
|
| 47 | + ], |
|
| 48 | + [ |
|
| 49 | + 'name' => 'first', |
|
| 50 | + 'model' => 'permissions', |
|
| 51 | + 'created_at' => \DB::raw('NOW()'), |
|
| 52 | + 'updated_at' => \DB::raw('NOW()') |
|
| 53 | + ], |
|
| 54 | + [ |
|
| 55 | + 'name' => 'paginate', |
|
| 56 | + 'model' => 'permissions', |
|
| 57 | + 'created_at' => \DB::raw('NOW()'), |
|
| 58 | + 'updated_at' => \DB::raw('NOW()') |
|
| 59 | + ], |
|
| 60 | + [ |
|
| 61 | + 'name' => 'paginateby', |
|
| 62 | + 'model' => 'permissions', |
|
| 63 | + 'created_at' => \DB::raw('NOW()'), |
|
| 64 | + 'updated_at' => \DB::raw('NOW()') |
|
| 65 | + ] |
|
| 66 | + ] |
|
| 67 | + ); |
|
| 68 | + } |
|
| 69 | 69 | } |
@@ -6,94 +6,94 @@ |
||
| 6 | 6 | |
| 7 | 7 | class GroupsTableSeeder extends Seeder |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the database seeds. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function run() |
|
| 15 | - { |
|
| 16 | - /** |
|
| 17 | - * Insert the permissions related to groups table. |
|
| 18 | - */ |
|
| 19 | - \DB::table('permissions')->insert( |
|
| 20 | - [ |
|
| 21 | - /** |
|
| 22 | - * Groups model permissions. |
|
| 23 | - */ |
|
| 24 | - [ |
|
| 25 | - 'name' => 'save', |
|
| 26 | - 'model' => 'groups', |
|
| 27 | - 'created_at' => \DB::raw('NOW()'), |
|
| 28 | - 'updated_at' => \DB::raw('NOW()') |
|
| 29 | - ], |
|
| 30 | - [ |
|
| 31 | - 'name' => 'delete', |
|
| 32 | - 'model' => 'groups', |
|
| 33 | - 'created_at' => \DB::raw('NOW()'), |
|
| 34 | - 'updated_at' => \DB::raw('NOW()') |
|
| 35 | - ], |
|
| 36 | - [ |
|
| 37 | - 'name' => 'find', |
|
| 38 | - 'model' => 'groups', |
|
| 39 | - 'created_at' => \DB::raw('NOW()'), |
|
| 40 | - 'updated_at' => \DB::raw('NOW()') |
|
| 41 | - ], |
|
| 42 | - [ |
|
| 43 | - 'name' => 'search', |
|
| 44 | - 'model' => 'groups', |
|
| 45 | - 'created_at' => \DB::raw('NOW()'), |
|
| 46 | - 'updated_at' => \DB::raw('NOW()') |
|
| 47 | - ], |
|
| 48 | - [ |
|
| 49 | - 'name' => 'list', |
|
| 50 | - 'model' => 'groups', |
|
| 51 | - 'created_at' => \DB::raw('NOW()'), |
|
| 52 | - 'updated_at' => \DB::raw('NOW()') |
|
| 53 | - ], |
|
| 54 | - [ |
|
| 55 | - 'name' => 'findby', |
|
| 56 | - 'model' => 'groups', |
|
| 57 | - 'created_at' => \DB::raw('NOW()'), |
|
| 58 | - 'updated_at' => \DB::raw('NOW()') |
|
| 59 | - ], |
|
| 60 | - [ |
|
| 61 | - 'name' => 'first', |
|
| 62 | - 'model' => 'groups', |
|
| 63 | - 'created_at' => \DB::raw('NOW()'), |
|
| 64 | - 'updated_at' => \DB::raw('NOW()') |
|
| 65 | - ], |
|
| 66 | - [ |
|
| 67 | - 'name' => 'paginate', |
|
| 68 | - 'model' => 'groups', |
|
| 69 | - 'created_at' => \DB::raw('NOW()'), |
|
| 70 | - 'updated_at' => \DB::raw('NOW()') |
|
| 71 | - ], |
|
| 72 | - [ |
|
| 73 | - 'name' => 'paginateby', |
|
| 74 | - 'model' => 'groups', |
|
| 75 | - 'created_at' => \DB::raw('NOW()'), |
|
| 76 | - 'updated_at' => \DB::raw('NOW()') |
|
| 77 | - ], |
|
| 78 | - [ |
|
| 79 | - 'name' => 'assignpermissions', |
|
| 80 | - 'model' => 'groups', |
|
| 81 | - 'created_at' => \DB::raw('NOW()'), |
|
| 82 | - 'updated_at' => \DB::raw('NOW()') |
|
| 83 | - ], |
|
| 84 | - [ |
|
| 85 | - 'name' => 'deleted', |
|
| 86 | - 'model' => 'groups', |
|
| 87 | - 'created_at' => \DB::raw('NOW()'), |
|
| 88 | - 'updated_at' => \DB::raw('NOW()') |
|
| 89 | - ], |
|
| 90 | - [ |
|
| 91 | - 'name' => 'restore', |
|
| 92 | - 'model' => 'groups', |
|
| 93 | - 'created_at' => \DB::raw('NOW()'), |
|
| 94 | - 'updated_at' => \DB::raw('NOW()') |
|
| 95 | - ] |
|
| 96 | - ] |
|
| 97 | - ); |
|
| 98 | - } |
|
| 9 | + /** |
|
| 10 | + * Run the database seeds. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function run() |
|
| 15 | + { |
|
| 16 | + /** |
|
| 17 | + * Insert the permissions related to groups table. |
|
| 18 | + */ |
|
| 19 | + \DB::table('permissions')->insert( |
|
| 20 | + [ |
|
| 21 | + /** |
|
| 22 | + * Groups model permissions. |
|
| 23 | + */ |
|
| 24 | + [ |
|
| 25 | + 'name' => 'save', |
|
| 26 | + 'model' => 'groups', |
|
| 27 | + 'created_at' => \DB::raw('NOW()'), |
|
| 28 | + 'updated_at' => \DB::raw('NOW()') |
|
| 29 | + ], |
|
| 30 | + [ |
|
| 31 | + 'name' => 'delete', |
|
| 32 | + 'model' => 'groups', |
|
| 33 | + 'created_at' => \DB::raw('NOW()'), |
|
| 34 | + 'updated_at' => \DB::raw('NOW()') |
|
| 35 | + ], |
|
| 36 | + [ |
|
| 37 | + 'name' => 'find', |
|
| 38 | + 'model' => 'groups', |
|
| 39 | + 'created_at' => \DB::raw('NOW()'), |
|
| 40 | + 'updated_at' => \DB::raw('NOW()') |
|
| 41 | + ], |
|
| 42 | + [ |
|
| 43 | + 'name' => 'search', |
|
| 44 | + 'model' => 'groups', |
|
| 45 | + 'created_at' => \DB::raw('NOW()'), |
|
| 46 | + 'updated_at' => \DB::raw('NOW()') |
|
| 47 | + ], |
|
| 48 | + [ |
|
| 49 | + 'name' => 'list', |
|
| 50 | + 'model' => 'groups', |
|
| 51 | + 'created_at' => \DB::raw('NOW()'), |
|
| 52 | + 'updated_at' => \DB::raw('NOW()') |
|
| 53 | + ], |
|
| 54 | + [ |
|
| 55 | + 'name' => 'findby', |
|
| 56 | + 'model' => 'groups', |
|
| 57 | + 'created_at' => \DB::raw('NOW()'), |
|
| 58 | + 'updated_at' => \DB::raw('NOW()') |
|
| 59 | + ], |
|
| 60 | + [ |
|
| 61 | + 'name' => 'first', |
|
| 62 | + 'model' => 'groups', |
|
| 63 | + 'created_at' => \DB::raw('NOW()'), |
|
| 64 | + 'updated_at' => \DB::raw('NOW()') |
|
| 65 | + ], |
|
| 66 | + [ |
|
| 67 | + 'name' => 'paginate', |
|
| 68 | + 'model' => 'groups', |
|
| 69 | + 'created_at' => \DB::raw('NOW()'), |
|
| 70 | + 'updated_at' => \DB::raw('NOW()') |
|
| 71 | + ], |
|
| 72 | + [ |
|
| 73 | + 'name' => 'paginateby', |
|
| 74 | + 'model' => 'groups', |
|
| 75 | + 'created_at' => \DB::raw('NOW()'), |
|
| 76 | + 'updated_at' => \DB::raw('NOW()') |
|
| 77 | + ], |
|
| 78 | + [ |
|
| 79 | + 'name' => 'assignpermissions', |
|
| 80 | + 'model' => 'groups', |
|
| 81 | + 'created_at' => \DB::raw('NOW()'), |
|
| 82 | + 'updated_at' => \DB::raw('NOW()') |
|
| 83 | + ], |
|
| 84 | + [ |
|
| 85 | + 'name' => 'deleted', |
|
| 86 | + 'model' => 'groups', |
|
| 87 | + 'created_at' => \DB::raw('NOW()'), |
|
| 88 | + 'updated_at' => \DB::raw('NOW()') |
|
| 89 | + ], |
|
| 90 | + [ |
|
| 91 | + 'name' => 'restore', |
|
| 92 | + 'model' => 'groups', |
|
| 93 | + 'created_at' => \DB::raw('NOW()'), |
|
| 94 | + 'updated_at' => \DB::raw('NOW()') |
|
| 95 | + ] |
|
| 96 | + ] |
|
| 97 | + ); |
|
| 98 | + } |
|
| 99 | 99 | } |
@@ -6,18 +6,18 @@ |
||
| 6 | 6 | |
| 7 | 7 | class AclDatabaseSeeder extends Seeder |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the database seeds. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function run() |
|
| 15 | - { |
|
| 16 | - $this->call(ClearDataSeeder::class); |
|
| 17 | - $this->call(UsersTableSeeder::class); |
|
| 18 | - $this->call(GroupsTableSeeder::class); |
|
| 19 | - $this->call(PermissionsTableSeeder::class); |
|
| 20 | - $this->call(OauthClientsTableSeeder::class); |
|
| 21 | - $this->call(AssignRelationsSeeder::class); |
|
| 22 | - } |
|
| 9 | + /** |
|
| 10 | + * Run the database seeds. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function run() |
|
| 15 | + { |
|
| 16 | + $this->call(ClearDataSeeder::class); |
|
| 17 | + $this->call(UsersTableSeeder::class); |
|
| 18 | + $this->call(GroupsTableSeeder::class); |
|
| 19 | + $this->call(PermissionsTableSeeder::class); |
|
| 20 | + $this->call(OauthClientsTableSeeder::class); |
|
| 21 | + $this->call(AssignRelationsSeeder::class); |
|
| 22 | + } |
|
| 23 | 23 | } |
@@ -6,82 +6,82 @@ |
||
| 6 | 6 | |
| 7 | 7 | class OauthClientsTableSeeder extends Seeder |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the database seeds. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function run() |
|
| 15 | - { |
|
| 16 | - /** |
|
| 17 | - * Insert the permissions related to oauthClients table. |
|
| 18 | - */ |
|
| 19 | - \DB::table('permissions')->insert( |
|
| 20 | - [ |
|
| 21 | - /** |
|
| 22 | - * Users model permissions. |
|
| 23 | - */ |
|
| 24 | - [ |
|
| 25 | - 'name' => 'list', |
|
| 26 | - 'model' => 'oauthClients', |
|
| 27 | - 'created_at' => \DB::raw('NOW()'), |
|
| 28 | - 'updated_at' => \DB::raw('NOW()') |
|
| 29 | - ], |
|
| 30 | - [ |
|
| 31 | - 'name' => 'find', |
|
| 32 | - 'model' => 'oauthClients', |
|
| 33 | - 'created_at' => \DB::raw('NOW()'), |
|
| 34 | - 'updated_at' => \DB::raw('NOW()') |
|
| 35 | - ], |
|
| 36 | - [ |
|
| 37 | - 'name' => 'search', |
|
| 38 | - 'model' => 'oauthClients', |
|
| 39 | - 'created_at' => \DB::raw('NOW()'), |
|
| 40 | - 'updated_at' => \DB::raw('NOW()') |
|
| 41 | - ], |
|
| 42 | - [ |
|
| 43 | - 'name' => 'paginate', |
|
| 44 | - 'model' => 'oauthClients', |
|
| 45 | - 'created_at' => \DB::raw('NOW()'), |
|
| 46 | - 'updated_at' => \DB::raw('NOW()') |
|
| 47 | - ], |
|
| 48 | - [ |
|
| 49 | - 'name' => 'revoke', |
|
| 50 | - 'model' => 'oauthClients', |
|
| 51 | - 'created_at' => \DB::raw('NOW()'), |
|
| 52 | - 'updated_at' => \DB::raw('NOW()') |
|
| 53 | - ], |
|
| 54 | - [ |
|
| 55 | - 'name' => 'unRevoke', |
|
| 56 | - 'model' => 'oauthClients', |
|
| 57 | - 'created_at' => \DB::raw('NOW()'), |
|
| 58 | - 'updated_at' => \DB::raw('NOW()') |
|
| 59 | - ], |
|
| 60 | - [ |
|
| 61 | - 'name' => 'first', |
|
| 62 | - 'model' => 'oauthClients', |
|
| 63 | - 'created_at' => \DB::raw('NOW()'), |
|
| 64 | - 'updated_at' => \DB::raw('NOW()') |
|
| 65 | - ], |
|
| 66 | - [ |
|
| 67 | - 'name' => 'findby', |
|
| 68 | - 'model' => 'oauthClients', |
|
| 69 | - 'created_at' => \DB::raw('NOW()'), |
|
| 70 | - 'updated_at' => \DB::raw('NOW()') |
|
| 71 | - ], |
|
| 72 | - [ |
|
| 73 | - 'name' => 'paginateby', |
|
| 74 | - 'model' => 'oauthClients', |
|
| 75 | - 'created_at' => \DB::raw('NOW()'), |
|
| 76 | - 'updated_at' => \DB::raw('NOW()') |
|
| 77 | - ], |
|
| 78 | - [ |
|
| 79 | - 'name' => 'save', |
|
| 80 | - 'model' => 'oauthClients', |
|
| 81 | - 'created_at' => \DB::raw('NOW()'), |
|
| 82 | - 'updated_at' => \DB::raw('NOW()') |
|
| 83 | - ] |
|
| 84 | - ] |
|
| 85 | - ); |
|
| 86 | - } |
|
| 9 | + /** |
|
| 10 | + * Run the database seeds. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function run() |
|
| 15 | + { |
|
| 16 | + /** |
|
| 17 | + * Insert the permissions related to oauthClients table. |
|
| 18 | + */ |
|
| 19 | + \DB::table('permissions')->insert( |
|
| 20 | + [ |
|
| 21 | + /** |
|
| 22 | + * Users model permissions. |
|
| 23 | + */ |
|
| 24 | + [ |
|
| 25 | + 'name' => 'list', |
|
| 26 | + 'model' => 'oauthClients', |
|
| 27 | + 'created_at' => \DB::raw('NOW()'), |
|
| 28 | + 'updated_at' => \DB::raw('NOW()') |
|
| 29 | + ], |
|
| 30 | + [ |
|
| 31 | + 'name' => 'find', |
|
| 32 | + 'model' => 'oauthClients', |
|
| 33 | + 'created_at' => \DB::raw('NOW()'), |
|
| 34 | + 'updated_at' => \DB::raw('NOW()') |
|
| 35 | + ], |
|
| 36 | + [ |
|
| 37 | + 'name' => 'search', |
|
| 38 | + 'model' => 'oauthClients', |
|
| 39 | + 'created_at' => \DB::raw('NOW()'), |
|
| 40 | + 'updated_at' => \DB::raw('NOW()') |
|
| 41 | + ], |
|
| 42 | + [ |
|
| 43 | + 'name' => 'paginate', |
|
| 44 | + 'model' => 'oauthClients', |
|
| 45 | + 'created_at' => \DB::raw('NOW()'), |
|
| 46 | + 'updated_at' => \DB::raw('NOW()') |
|
| 47 | + ], |
|
| 48 | + [ |
|
| 49 | + 'name' => 'revoke', |
|
| 50 | + 'model' => 'oauthClients', |
|
| 51 | + 'created_at' => \DB::raw('NOW()'), |
|
| 52 | + 'updated_at' => \DB::raw('NOW()') |
|
| 53 | + ], |
|
| 54 | + [ |
|
| 55 | + 'name' => 'unRevoke', |
|
| 56 | + 'model' => 'oauthClients', |
|
| 57 | + 'created_at' => \DB::raw('NOW()'), |
|
| 58 | + 'updated_at' => \DB::raw('NOW()') |
|
| 59 | + ], |
|
| 60 | + [ |
|
| 61 | + 'name' => 'first', |
|
| 62 | + 'model' => 'oauthClients', |
|
| 63 | + 'created_at' => \DB::raw('NOW()'), |
|
| 64 | + 'updated_at' => \DB::raw('NOW()') |
|
| 65 | + ], |
|
| 66 | + [ |
|
| 67 | + 'name' => 'findby', |
|
| 68 | + 'model' => 'oauthClients', |
|
| 69 | + 'created_at' => \DB::raw('NOW()'), |
|
| 70 | + 'updated_at' => \DB::raw('NOW()') |
|
| 71 | + ], |
|
| 72 | + [ |
|
| 73 | + 'name' => 'paginateby', |
|
| 74 | + 'model' => 'oauthClients', |
|
| 75 | + 'created_at' => \DB::raw('NOW()'), |
|
| 76 | + 'updated_at' => \DB::raw('NOW()') |
|
| 77 | + ], |
|
| 78 | + [ |
|
| 79 | + 'name' => 'save', |
|
| 80 | + 'model' => 'oauthClients', |
|
| 81 | + 'created_at' => \DB::raw('NOW()'), |
|
| 82 | + 'updated_at' => \DB::raw('NOW()') |
|
| 83 | + ] |
|
| 84 | + ] |
|
| 85 | + ); |
|
| 86 | + } |
|
| 87 | 87 | } |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | |
| 52 | 52 | $response = \ApiConsumer::post('/oauth/token', $data); |
| 53 | 53 | |
| 54 | - if (! $response->isSuccessful()) { |
|
| 54 | + if ( ! $response->isSuccessful()) { |
|
| 55 | 55 | if ($grantType == 'refresh_token') { |
| 56 | 56 | \ErrorHandler::invalidRefreshToken(); |
| 57 | 57 | } |
@@ -2,77 +2,77 @@ |
||
| 2 | 2 | |
| 3 | 3 | class LoginProxy |
| 4 | 4 | { |
| 5 | - /** |
|
| 6 | - * Attempt to create an access token using user credentials. |
|
| 7 | - * |
|
| 8 | - * @param array $credentials |
|
| 9 | - * @param boolean $adminLogin |
|
| 10 | - * @return array |
|
| 11 | - */ |
|
| 12 | - public function login($credentials, $adminLogin = false) |
|
| 13 | - { |
|
| 14 | - $user = \Core::users()->login($credentials, $adminLogin); |
|
| 15 | - $tokens = $this->proxy('password', [ |
|
| 16 | - 'username' => $credentials['email'], |
|
| 17 | - 'password' => $credentials['password'] |
|
| 18 | - ]); |
|
| 5 | + /** |
|
| 6 | + * Attempt to create an access token using user credentials. |
|
| 7 | + * |
|
| 8 | + * @param array $credentials |
|
| 9 | + * @param boolean $adminLogin |
|
| 10 | + * @return array |
|
| 11 | + */ |
|
| 12 | + public function login($credentials, $adminLogin = false) |
|
| 13 | + { |
|
| 14 | + $user = \Core::users()->login($credentials, $adminLogin); |
|
| 15 | + $tokens = $this->proxy('password', [ |
|
| 16 | + 'username' => $credentials['email'], |
|
| 17 | + 'password' => $credentials['password'] |
|
| 18 | + ]); |
|
| 19 | 19 | |
| 20 | - return compact('user', 'tokens'); |
|
| 21 | - } |
|
| 20 | + return compact('user', 'tokens'); |
|
| 21 | + } |
|
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * Attempt to refresh the access token useing the given refresh token. |
|
| 25 | - * |
|
| 26 | - * @param string $refreshToken |
|
| 27 | - * @return array |
|
| 28 | - */ |
|
| 29 | - public function refreshtoken($refreshToken) |
|
| 30 | - { |
|
| 31 | - return $this->proxy('refresh_token', [ |
|
| 32 | - 'refresh_token' => $refreshToken |
|
| 33 | - ]); |
|
| 34 | - } |
|
| 23 | + /** |
|
| 24 | + * Attempt to refresh the access token useing the given refresh token. |
|
| 25 | + * |
|
| 26 | + * @param string $refreshToken |
|
| 27 | + * @return array |
|
| 28 | + */ |
|
| 29 | + public function refreshtoken($refreshToken) |
|
| 30 | + { |
|
| 31 | + return $this->proxy('refresh_token', [ |
|
| 32 | + 'refresh_token' => $refreshToken |
|
| 33 | + ]); |
|
| 34 | + } |
|
| 35 | 35 | |
| 36 | - /** |
|
| 37 | - * Proxy a request to the OAuth server. |
|
| 38 | - * |
|
| 39 | - * @param string $grantType what type of grant type should be proxied |
|
| 40 | - * @param array |
|
| 41 | - */ |
|
| 42 | - public function proxy($grantType, array $data = []) |
|
| 43 | - { |
|
| 44 | - $data = array_merge($data, [ |
|
| 45 | - 'client_id' => config('skeleton.passport_client_id'), |
|
| 46 | - 'client_secret' => config('skeleton.passport_client_secret'), |
|
| 47 | - 'grant_type' => $grantType |
|
| 48 | - ]); |
|
| 36 | + /** |
|
| 37 | + * Proxy a request to the OAuth server. |
|
| 38 | + * |
|
| 39 | + * @param string $grantType what type of grant type should be proxied |
|
| 40 | + * @param array |
|
| 41 | + */ |
|
| 42 | + public function proxy($grantType, array $data = []) |
|
| 43 | + { |
|
| 44 | + $data = array_merge($data, [ |
|
| 45 | + 'client_id' => config('skeleton.passport_client_id'), |
|
| 46 | + 'client_secret' => config('skeleton.passport_client_secret'), |
|
| 47 | + 'grant_type' => $grantType |
|
| 48 | + ]); |
|
| 49 | 49 | |
| 50 | - $response = \ApiConsumer::post('/oauth/token', $data); |
|
| 50 | + $response = \ApiConsumer::post('/oauth/token', $data); |
|
| 51 | 51 | |
| 52 | - if (! $response->isSuccessful()) { |
|
| 53 | - if ($grantType == 'refresh_token') { |
|
| 54 | - \ErrorHandler::invalidRefreshToken(); |
|
| 55 | - } |
|
| 52 | + if (! $response->isSuccessful()) { |
|
| 53 | + if ($grantType == 'refresh_token') { |
|
| 54 | + \ErrorHandler::invalidRefreshToken(); |
|
| 55 | + } |
|
| 56 | 56 | |
| 57 | - \ErrorHandler::loginFailed(); |
|
| 58 | - } |
|
| 57 | + \ErrorHandler::loginFailed(); |
|
| 58 | + } |
|
| 59 | 59 | |
| 60 | - $data = json_decode($response->getContent()); |
|
| 60 | + $data = json_decode($response->getContent()); |
|
| 61 | 61 | |
| 62 | - return [ |
|
| 63 | - 'access_token' => $data->access_token, |
|
| 64 | - 'refresh_token' => $data->refresh_token, |
|
| 65 | - 'expires_in' => $data->expires_in |
|
| 66 | - ]; |
|
| 67 | - } |
|
| 62 | + return [ |
|
| 63 | + 'access_token' => $data->access_token, |
|
| 64 | + 'refresh_token' => $data->refresh_token, |
|
| 65 | + 'expires_in' => $data->expires_in |
|
| 66 | + ]; |
|
| 67 | + } |
|
| 68 | 68 | |
| 69 | - /** |
|
| 70 | - * Logs out the user. We revoke access token and refresh token. |
|
| 71 | - * |
|
| 72 | - * @return void |
|
| 73 | - */ |
|
| 74 | - public function logout() |
|
| 75 | - { |
|
| 76 | - \Core::users()->revokeAccessToken(\Auth::user()->token()); |
|
| 77 | - } |
|
| 69 | + /** |
|
| 70 | + * Logs out the user. We revoke access token and refresh token. |
|
| 71 | + * |
|
| 72 | + * @return void |
|
| 73 | + */ |
|
| 74 | + public function logout() |
|
| 75 | + { |
|
| 76 | + \Core::users()->revokeAccessToken(\Auth::user()->token()); |
|
| 77 | + } |
|
| 78 | 78 | } |
@@ -13,75 +13,75 @@ |
||
| 13 | 13 | |
| 14 | 14 | Route::group(['prefix' => 'acl'], function () { |
| 15 | 15 | |
| 16 | - Route::group(['prefix' => 'users'], function () { |
|
| 16 | + Route::group(['prefix' => 'users'], function () { |
|
| 17 | 17 | |
| 18 | - Route::get('list/{sortBy?}/{desc?}', 'UsersController@index'); |
|
| 19 | - Route::get('find/{id}', 'UsersController@find'); |
|
| 20 | - Route::get('search/{query?}/{perPage?}/{sortBy?}/{desc?}', 'UsersController@search'); |
|
| 21 | - Route::get('paginate/{perPage?}/{sortBy?}/{desc?}', 'UsersController@paginate'); |
|
| 22 | - Route::get('delete/{id}', 'UsersController@delete'); |
|
| 23 | - Route::get('restore/{id}', 'UsersController@restore'); |
|
| 24 | - Route::get('account', 'UsersController@account'); |
|
| 25 | - Route::get('block/{id}', 'UsersController@block'); |
|
| 26 | - Route::get('unblock/{id}', 'UsersController@unblock'); |
|
| 27 | - Route::get('logout', 'UsersController@logout'); |
|
| 28 | - Route::post('refreshtoken', 'UsersController@refreshtoken'); |
|
| 29 | - Route::post('first', 'UsersController@first'); |
|
| 30 | - Route::post('findby/{sortBy?}/{desc?}', 'UsersController@findby'); |
|
| 31 | - Route::post('paginateby/{perPage?}/{sortBy?}/{desc?}', 'UsersController@paginateby'); |
|
| 32 | - Route::post('save', 'UsersController@save'); |
|
| 33 | - Route::post('profile/save', 'UsersController@saveProfile'); |
|
| 34 | - Route::post('deleted/{perPage?}/{sortBy?}/{desc?}', 'UsersController@deleted'); |
|
| 35 | - Route::post('register', 'UsersController@register'); |
|
| 36 | - Route::post('login', 'UsersController@login'); |
|
| 37 | - Route::post('login/social', 'UsersController@loginSocial'); |
|
| 38 | - Route::post('assigngroups', 'UsersController@assigngroups'); |
|
| 39 | - Route::post('sendreset', 'UsersController@sendreset'); |
|
| 40 | - Route::post('resetpassword', 'UsersController@resetpassword'); |
|
| 41 | - Route::post('changepassword', 'UsersController@changePassword'); |
|
| 42 | - Route::post('confirm/email', 'UsersController@confirmEmail'); |
|
| 43 | - Route::post('resend/email/confirmation', 'UsersController@resendEmailConfirmation'); |
|
| 44 | - Route::post('group/{groupName}/{perPage?}/{sortBy?}/{desc?}', 'UsersController@group'); |
|
| 45 | - }); |
|
| 18 | + Route::get('list/{sortBy?}/{desc?}', 'UsersController@index'); |
|
| 19 | + Route::get('find/{id}', 'UsersController@find'); |
|
| 20 | + Route::get('search/{query?}/{perPage?}/{sortBy?}/{desc?}', 'UsersController@search'); |
|
| 21 | + Route::get('paginate/{perPage?}/{sortBy?}/{desc?}', 'UsersController@paginate'); |
|
| 22 | + Route::get('delete/{id}', 'UsersController@delete'); |
|
| 23 | + Route::get('restore/{id}', 'UsersController@restore'); |
|
| 24 | + Route::get('account', 'UsersController@account'); |
|
| 25 | + Route::get('block/{id}', 'UsersController@block'); |
|
| 26 | + Route::get('unblock/{id}', 'UsersController@unblock'); |
|
| 27 | + Route::get('logout', 'UsersController@logout'); |
|
| 28 | + Route::post('refreshtoken', 'UsersController@refreshtoken'); |
|
| 29 | + Route::post('first', 'UsersController@first'); |
|
| 30 | + Route::post('findby/{sortBy?}/{desc?}', 'UsersController@findby'); |
|
| 31 | + Route::post('paginateby/{perPage?}/{sortBy?}/{desc?}', 'UsersController@paginateby'); |
|
| 32 | + Route::post('save', 'UsersController@save'); |
|
| 33 | + Route::post('profile/save', 'UsersController@saveProfile'); |
|
| 34 | + Route::post('deleted/{perPage?}/{sortBy?}/{desc?}', 'UsersController@deleted'); |
|
| 35 | + Route::post('register', 'UsersController@register'); |
|
| 36 | + Route::post('login', 'UsersController@login'); |
|
| 37 | + Route::post('login/social', 'UsersController@loginSocial'); |
|
| 38 | + Route::post('assigngroups', 'UsersController@assigngroups'); |
|
| 39 | + Route::post('sendreset', 'UsersController@sendreset'); |
|
| 40 | + Route::post('resetpassword', 'UsersController@resetpassword'); |
|
| 41 | + Route::post('changepassword', 'UsersController@changePassword'); |
|
| 42 | + Route::post('confirm/email', 'UsersController@confirmEmail'); |
|
| 43 | + Route::post('resend/email/confirmation', 'UsersController@resendEmailConfirmation'); |
|
| 44 | + Route::post('group/{groupName}/{perPage?}/{sortBy?}/{desc?}', 'UsersController@group'); |
|
| 45 | + }); |
|
| 46 | 46 | |
| 47 | - Route::group(['prefix' => 'groups'], function () { |
|
| 47 | + Route::group(['prefix' => 'groups'], function () { |
|
| 48 | 48 | |
| 49 | - Route::get('list/{sortBy?}/{desc?}', 'GroupsController@index'); |
|
| 50 | - Route::get('find/{id}', 'GroupsController@find'); |
|
| 51 | - Route::get('search/{query?}/{perPage?}/{sortBy?}/{desc?}', 'GroupsController@search'); |
|
| 52 | - Route::get('paginate/{perPage?}/{sortBy?}/{desc?}', 'GroupsController@paginate'); |
|
| 53 | - Route::get('delete/{id}', 'GroupsController@delete'); |
|
| 54 | - Route::get('restore/{id}', 'GroupsController@restore'); |
|
| 55 | - Route::post('first', 'GroupsController@first'); |
|
| 56 | - Route::post('findby/{sortBy?}/{desc?}', 'GroupsController@findby'); |
|
| 57 | - Route::post('paginateby/{perPage?}/{sortBy?}/{desc?}', 'GroupsController@paginateby'); |
|
| 58 | - Route::post('save', 'GroupsController@save'); |
|
| 59 | - Route::post('deleted/{perPage?}/{sortBy?}/{desc?}', 'GroupsController@deleted'); |
|
| 60 | - Route::post('assignpermissions', 'GroupsController@assignpermissions'); |
|
| 61 | - }); |
|
| 49 | + Route::get('list/{sortBy?}/{desc?}', 'GroupsController@index'); |
|
| 50 | + Route::get('find/{id}', 'GroupsController@find'); |
|
| 51 | + Route::get('search/{query?}/{perPage?}/{sortBy?}/{desc?}', 'GroupsController@search'); |
|
| 52 | + Route::get('paginate/{perPage?}/{sortBy?}/{desc?}', 'GroupsController@paginate'); |
|
| 53 | + Route::get('delete/{id}', 'GroupsController@delete'); |
|
| 54 | + Route::get('restore/{id}', 'GroupsController@restore'); |
|
| 55 | + Route::post('first', 'GroupsController@first'); |
|
| 56 | + Route::post('findby/{sortBy?}/{desc?}', 'GroupsController@findby'); |
|
| 57 | + Route::post('paginateby/{perPage?}/{sortBy?}/{desc?}', 'GroupsController@paginateby'); |
|
| 58 | + Route::post('save', 'GroupsController@save'); |
|
| 59 | + Route::post('deleted/{perPage?}/{sortBy?}/{desc?}', 'GroupsController@deleted'); |
|
| 60 | + Route::post('assignpermissions', 'GroupsController@assignpermissions'); |
|
| 61 | + }); |
|
| 62 | 62 | |
| 63 | - Route::group(['prefix' => 'permissions'], function () { |
|
| 63 | + Route::group(['prefix' => 'permissions'], function () { |
|
| 64 | 64 | |
| 65 | - Route::get('list/{sortBy?}/{desc?}', 'PermissionsController@index'); |
|
| 66 | - Route::get('find/{id}', 'PermissionsController@find'); |
|
| 67 | - Route::get('search/{query?}/{perPage?}/{sortBy?}/{desc?}', 'PermissionsController@search'); |
|
| 68 | - Route::get('paginate/{perPage?}/{sortBy?}/{desc?}', 'PermissionsController@paginate'); |
|
| 69 | - Route::post('first', 'PermissionsController@first'); |
|
| 70 | - Route::post('findby/{sortBy?}/{desc?}', 'PermissionsController@findby'); |
|
| 71 | - Route::post('paginateby/{perPage?}/{sortBy?}/{desc?}', 'PermissionsController@paginateby'); |
|
| 72 | - }); |
|
| 65 | + Route::get('list/{sortBy?}/{desc?}', 'PermissionsController@index'); |
|
| 66 | + Route::get('find/{id}', 'PermissionsController@find'); |
|
| 67 | + Route::get('search/{query?}/{perPage?}/{sortBy?}/{desc?}', 'PermissionsController@search'); |
|
| 68 | + Route::get('paginate/{perPage?}/{sortBy?}/{desc?}', 'PermissionsController@paginate'); |
|
| 69 | + Route::post('first', 'PermissionsController@first'); |
|
| 70 | + Route::post('findby/{sortBy?}/{desc?}', 'PermissionsController@findby'); |
|
| 71 | + Route::post('paginateby/{perPage?}/{sortBy?}/{desc?}', 'PermissionsController@paginateby'); |
|
| 72 | + }); |
|
| 73 | 73 | |
| 74 | - Route::group(['prefix' => 'oauth/clients'], function () { |
|
| 74 | + Route::group(['prefix' => 'oauth/clients'], function () { |
|
| 75 | 75 | |
| 76 | - Route::get('list/{sortBy?}/{desc?}', 'OauthClientsController@index'); |
|
| 77 | - Route::get('find/{id}', 'OauthClientsController@find'); |
|
| 78 | - Route::get('search/{query?}/{perPage?}/{sortBy?}/{desc?}', 'OauthClientsController@search'); |
|
| 79 | - Route::get('paginate/{perPage?}/{sortBy?}/{desc?}', 'OauthClientsController@paginate'); |
|
| 80 | - Route::get('revoke/{id}', 'OauthClientsController@revoke'); |
|
| 81 | - Route::get('unrevoke/{id}', 'OauthClientsController@unRevoke'); |
|
| 82 | - Route::post('first', 'OauthClientsController@first'); |
|
| 83 | - Route::post('findby/{sortBy?}/{desc?}', 'OauthClientsController@findby'); |
|
| 84 | - Route::post('paginateby/{perPage?}/{sortBy?}/{desc?}', 'OauthClientsController@paginateby'); |
|
| 85 | - Route::post('save', 'OauthClientsController@save'); |
|
| 86 | - }); |
|
| 76 | + Route::get('list/{sortBy?}/{desc?}', 'OauthClientsController@index'); |
|
| 77 | + Route::get('find/{id}', 'OauthClientsController@find'); |
|
| 78 | + Route::get('search/{query?}/{perPage?}/{sortBy?}/{desc?}', 'OauthClientsController@search'); |
|
| 79 | + Route::get('paginate/{perPage?}/{sortBy?}/{desc?}', 'OauthClientsController@paginate'); |
|
| 80 | + Route::get('revoke/{id}', 'OauthClientsController@revoke'); |
|
| 81 | + Route::get('unrevoke/{id}', 'OauthClientsController@unRevoke'); |
|
| 82 | + Route::post('first', 'OauthClientsController@first'); |
|
| 83 | + Route::post('findby/{sortBy?}/{desc?}', 'OauthClientsController@findby'); |
|
| 84 | + Route::post('paginateby/{perPage?}/{sortBy?}/{desc?}', 'OauthClientsController@paginateby'); |
|
| 85 | + Route::post('save', 'OauthClientsController@save'); |
|
| 86 | + }); |
|
| 87 | 87 | }); |
@@ -11,9 +11,9 @@ discard block |
||
| 11 | 11 | | |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | -Route::group(['prefix' => 'acl'], function () { |
|
| 14 | +Route::group(['prefix' => 'acl'], function() { |
|
| 15 | 15 | |
| 16 | - Route::group(['prefix' => 'users'], function () { |
|
| 16 | + Route::group(['prefix' => 'users'], function() { |
|
| 17 | 17 | |
| 18 | 18 | Route::get('list/{sortBy?}/{desc?}', 'UsersController@index'); |
| 19 | 19 | Route::get('find/{id}', 'UsersController@find'); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | Route::post('group/{groupName}/{perPage?}/{sortBy?}/{desc?}', 'UsersController@group'); |
| 45 | 45 | }); |
| 46 | 46 | |
| 47 | - Route::group(['prefix' => 'groups'], function () { |
|
| 47 | + Route::group(['prefix' => 'groups'], function() { |
|
| 48 | 48 | |
| 49 | 49 | Route::get('list/{sortBy?}/{desc?}', 'GroupsController@index'); |
| 50 | 50 | Route::get('find/{id}', 'GroupsController@find'); |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | Route::post('assignpermissions', 'GroupsController@assignpermissions'); |
| 61 | 61 | }); |
| 62 | 62 | |
| 63 | - Route::group(['prefix' => 'permissions'], function () { |
|
| 63 | + Route::group(['prefix' => 'permissions'], function() { |
|
| 64 | 64 | |
| 65 | 65 | Route::get('list/{sortBy?}/{desc?}', 'PermissionsController@index'); |
| 66 | 66 | Route::get('find/{id}', 'PermissionsController@find'); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | Route::post('paginateby/{perPage?}/{sortBy?}/{desc?}', 'PermissionsController@paginateby'); |
| 72 | 72 | }); |
| 73 | 73 | |
| 74 | - Route::group(['prefix' => 'oauth/clients'], function () { |
|
| 74 | + Route::group(['prefix' => 'oauth/clients'], function() { |
|
| 75 | 75 | |
| 76 | 76 | Route::get('list/{sortBy?}/{desc?}', 'OauthClientsController@index'); |
| 77 | 77 | Route::get('find/{id}', 'OauthClientsController@find'); |
@@ -6,53 +6,53 @@ |
||
| 6 | 6 | class AclPermissionObserver |
| 7 | 7 | { |
| 8 | 8 | |
| 9 | - public function saving($model) |
|
| 10 | - { |
|
| 11 | - // |
|
| 12 | - } |
|
| 13 | - |
|
| 14 | - public function saved($model) |
|
| 15 | - { |
|
| 16 | - // |
|
| 17 | - } |
|
| 18 | - |
|
| 19 | - public function creating($model) |
|
| 20 | - { |
|
| 21 | - // |
|
| 22 | - } |
|
| 23 | - |
|
| 24 | - public function created($model) |
|
| 25 | - { |
|
| 26 | - // |
|
| 27 | - } |
|
| 28 | - |
|
| 29 | - public function updating($model) |
|
| 30 | - { |
|
| 31 | - // |
|
| 32 | - } |
|
| 33 | - |
|
| 34 | - public function updated($model) |
|
| 35 | - { |
|
| 36 | - // |
|
| 37 | - } |
|
| 38 | - |
|
| 39 | - public function deleting($model) |
|
| 40 | - { |
|
| 41 | - // |
|
| 42 | - } |
|
| 43 | - |
|
| 44 | - public function deleted($model) |
|
| 45 | - { |
|
| 46 | - // |
|
| 47 | - } |
|
| 48 | - |
|
| 49 | - public function restoring($model) |
|
| 50 | - { |
|
| 51 | - // |
|
| 52 | - } |
|
| 53 | - |
|
| 54 | - public function restored($model) |
|
| 55 | - { |
|
| 56 | - // |
|
| 57 | - } |
|
| 9 | + public function saving($model) |
|
| 10 | + { |
|
| 11 | + // |
|
| 12 | + } |
|
| 13 | + |
|
| 14 | + public function saved($model) |
|
| 15 | + { |
|
| 16 | + // |
|
| 17 | + } |
|
| 18 | + |
|
| 19 | + public function creating($model) |
|
| 20 | + { |
|
| 21 | + // |
|
| 22 | + } |
|
| 23 | + |
|
| 24 | + public function created($model) |
|
| 25 | + { |
|
| 26 | + // |
|
| 27 | + } |
|
| 28 | + |
|
| 29 | + public function updating($model) |
|
| 30 | + { |
|
| 31 | + // |
|
| 32 | + } |
|
| 33 | + |
|
| 34 | + public function updated($model) |
|
| 35 | + { |
|
| 36 | + // |
|
| 37 | + } |
|
| 38 | + |
|
| 39 | + public function deleting($model) |
|
| 40 | + { |
|
| 41 | + // |
|
| 42 | + } |
|
| 43 | + |
|
| 44 | + public function deleted($model) |
|
| 45 | + { |
|
| 46 | + // |
|
| 47 | + } |
|
| 48 | + |
|
| 49 | + public function restoring($model) |
|
| 50 | + { |
|
| 51 | + // |
|
| 52 | + } |
|
| 53 | + |
|
| 54 | + public function restored($model) |
|
| 55 | + { |
|
| 56 | + // |
|
| 57 | + } |
|
| 58 | 58 | } |