@@ -5,51 +5,51 @@ |
||
5 | 5 | */ |
6 | 6 | class AclUserObserver { |
7 | 7 | |
8 | - public function saving($model) |
|
9 | - { |
|
10 | - // |
|
11 | - } |
|
12 | - |
|
13 | - public function saved($model) |
|
14 | - { |
|
15 | - // |
|
16 | - } |
|
17 | - |
|
18 | - public function creating($model) |
|
19 | - { |
|
20 | - // |
|
21 | - } |
|
22 | - |
|
23 | - public function created($model) |
|
24 | - { |
|
25 | - // |
|
26 | - } |
|
27 | - |
|
28 | - public function updating($model) |
|
29 | - { |
|
30 | - // |
|
31 | - } |
|
32 | - |
|
33 | - public function updated($model) |
|
34 | - { |
|
35 | - // |
|
36 | - } |
|
37 | - |
|
38 | - /** |
|
39 | - * Soft delete the associated groups and logs to the deleted user. |
|
40 | - * |
|
41 | - * @param object $model the delted model. |
|
42 | - * @return void |
|
43 | - */ |
|
44 | - public function deleting($model) |
|
45 | - { |
|
46 | - \DB::table('users_groups')->where('user_id', $model->id)->update(array('deleted_at' => \DB::raw('NOW()'))); |
|
47 | - $model->logs()->delete(); |
|
48 | - } |
|
49 | - |
|
50 | - public function deleted($model) |
|
51 | - { |
|
52 | - // |
|
53 | - } |
|
8 | + public function saving($model) |
|
9 | + { |
|
10 | + // |
|
11 | + } |
|
12 | + |
|
13 | + public function saved($model) |
|
14 | + { |
|
15 | + // |
|
16 | + } |
|
17 | + |
|
18 | + public function creating($model) |
|
19 | + { |
|
20 | + // |
|
21 | + } |
|
22 | + |
|
23 | + public function created($model) |
|
24 | + { |
|
25 | + // |
|
26 | + } |
|
27 | + |
|
28 | + public function updating($model) |
|
29 | + { |
|
30 | + // |
|
31 | + } |
|
32 | + |
|
33 | + public function updated($model) |
|
34 | + { |
|
35 | + // |
|
36 | + } |
|
37 | + |
|
38 | + /** |
|
39 | + * Soft delete the associated groups and logs to the deleted user. |
|
40 | + * |
|
41 | + * @param object $model the delted model. |
|
42 | + * @return void |
|
43 | + */ |
|
44 | + public function deleting($model) |
|
45 | + { |
|
46 | + \DB::table('users_groups')->where('user_id', $model->id)->update(array('deleted_at' => \DB::raw('NOW()'))); |
|
47 | + $model->logs()->delete(); |
|
48 | + } |
|
49 | + |
|
50 | + public function deleted($model) |
|
51 | + { |
|
52 | + // |
|
53 | + } |
|
54 | 54 | |
55 | 55 | } |
56 | 56 | \ No newline at end of file |
@@ -5,50 +5,50 @@ |
||
5 | 5 | */ |
6 | 6 | class AclGroupObserver { |
7 | 7 | |
8 | - public function saving($model) |
|
9 | - { |
|
10 | - // |
|
11 | - } |
|
12 | - |
|
13 | - public function saved($model) |
|
14 | - { |
|
15 | - // |
|
16 | - } |
|
17 | - |
|
18 | - public function creating($model) |
|
19 | - { |
|
20 | - // |
|
21 | - } |
|
22 | - |
|
23 | - public function created($model) |
|
24 | - { |
|
25 | - // |
|
26 | - } |
|
27 | - |
|
28 | - public function updating($model) |
|
29 | - { |
|
30 | - // |
|
31 | - } |
|
32 | - |
|
33 | - public function updated($model) |
|
34 | - { |
|
35 | - // |
|
36 | - } |
|
37 | - |
|
38 | - /** |
|
39 | - * Soft delete the associated permissions to the deleted group. |
|
40 | - * |
|
41 | - * @param object $model the delted model. |
|
42 | - * @return void |
|
43 | - */ |
|
44 | - public function deleting($model) |
|
45 | - { |
|
46 | - \DB::table('groups_permissions')->where('group_id', $model->id)->update(array('deleted_at' => \DB::raw('NOW()'))); |
|
47 | - } |
|
48 | - |
|
49 | - public function deleted($model) |
|
50 | - { |
|
51 | - // |
|
52 | - } |
|
8 | + public function saving($model) |
|
9 | + { |
|
10 | + // |
|
11 | + } |
|
12 | + |
|
13 | + public function saved($model) |
|
14 | + { |
|
15 | + // |
|
16 | + } |
|
17 | + |
|
18 | + public function creating($model) |
|
19 | + { |
|
20 | + // |
|
21 | + } |
|
22 | + |
|
23 | + public function created($model) |
|
24 | + { |
|
25 | + // |
|
26 | + } |
|
27 | + |
|
28 | + public function updating($model) |
|
29 | + { |
|
30 | + // |
|
31 | + } |
|
32 | + |
|
33 | + public function updated($model) |
|
34 | + { |
|
35 | + // |
|
36 | + } |
|
37 | + |
|
38 | + /** |
|
39 | + * Soft delete the associated permissions to the deleted group. |
|
40 | + * |
|
41 | + * @param object $model the delted model. |
|
42 | + * @return void |
|
43 | + */ |
|
44 | + public function deleting($model) |
|
45 | + { |
|
46 | + \DB::table('groups_permissions')->where('group_id', $model->id)->update(array('deleted_at' => \DB::raw('NOW()'))); |
|
47 | + } |
|
48 | + |
|
49 | + public function deleted($model) |
|
50 | + { |
|
51 | + // |
|
52 | + } |
|
53 | 53 | |
54 | 54 | } |
55 | 55 | \ No newline at end of file |
@@ -5,50 +5,50 @@ |
||
5 | 5 | */ |
6 | 6 | class AclPermissionObserver { |
7 | 7 | |
8 | - public function saving($model) |
|
9 | - { |
|
10 | - // |
|
11 | - } |
|
12 | - |
|
13 | - public function saved($model) |
|
14 | - { |
|
15 | - // |
|
16 | - } |
|
17 | - |
|
18 | - public function creating($model) |
|
19 | - { |
|
20 | - // |
|
21 | - } |
|
22 | - |
|
23 | - public function created($model) |
|
24 | - { |
|
25 | - // |
|
26 | - } |
|
27 | - |
|
28 | - public function updating($model) |
|
29 | - { |
|
30 | - // |
|
31 | - } |
|
32 | - |
|
33 | - public function updated($model) |
|
34 | - { |
|
35 | - // |
|
36 | - } |
|
37 | - |
|
38 | - /** |
|
39 | - * Soft delete the associated groups to the deleted permission. |
|
40 | - * |
|
41 | - * @param object $model the delted model. |
|
42 | - * @return void |
|
43 | - */ |
|
44 | - public function deleting($model) |
|
45 | - { |
|
46 | - \DB::table('groups_permissions')->where('permission_id', $model->id)->update(array('deleted_at' => \DB::raw('NOW()'))); |
|
47 | - } |
|
48 | - |
|
49 | - public function deleted($model) |
|
50 | - { |
|
51 | - // |
|
52 | - } |
|
8 | + public function saving($model) |
|
9 | + { |
|
10 | + // |
|
11 | + } |
|
12 | + |
|
13 | + public function saved($model) |
|
14 | + { |
|
15 | + // |
|
16 | + } |
|
17 | + |
|
18 | + public function creating($model) |
|
19 | + { |
|
20 | + // |
|
21 | + } |
|
22 | + |
|
23 | + public function created($model) |
|
24 | + { |
|
25 | + // |
|
26 | + } |
|
27 | + |
|
28 | + public function updating($model) |
|
29 | + { |
|
30 | + // |
|
31 | + } |
|
32 | + |
|
33 | + public function updated($model) |
|
34 | + { |
|
35 | + // |
|
36 | + } |
|
37 | + |
|
38 | + /** |
|
39 | + * Soft delete the associated groups to the deleted permission. |
|
40 | + * |
|
41 | + * @param object $model the delted model. |
|
42 | + * @return void |
|
43 | + */ |
|
44 | + public function deleting($model) |
|
45 | + { |
|
46 | + \DB::table('groups_permissions')->where('permission_id', $model->id)->update(array('deleted_at' => \DB::raw('NOW()'))); |
|
47 | + } |
|
48 | + |
|
49 | + public function deleted($model) |
|
50 | + { |
|
51 | + // |
|
52 | + } |
|
53 | 53 | |
54 | 54 | } |
55 | 55 | \ No newline at end of file |
@@ -5,51 +5,51 @@ |
||
5 | 5 | */ |
6 | 6 | class NotificationObserver { |
7 | 7 | |
8 | - public function saving($model) |
|
9 | - { |
|
10 | - // |
|
11 | - } |
|
12 | - |
|
13 | - public function saved($model) |
|
14 | - { |
|
15 | - // |
|
16 | - } |
|
17 | - |
|
18 | - public function creating($model) |
|
19 | - { |
|
20 | - // |
|
21 | - } |
|
22 | - |
|
23 | - /** |
|
24 | - * Publish the created notification to the redis server |
|
25 | - * to broadcast it to all listners. |
|
26 | - * |
|
27 | - * @param object $model the model beign created. |
|
28 | - * @return void |
|
29 | - */ |
|
30 | - public function created($model) |
|
31 | - { |
|
32 | - \Redis::publish('notification', json_encode($model->toArray())); |
|
33 | - } |
|
34 | - |
|
35 | - public function updating($model) |
|
36 | - { |
|
37 | - // |
|
38 | - } |
|
39 | - |
|
40 | - public function updated($model) |
|
41 | - { |
|
42 | - // |
|
43 | - } |
|
44 | - |
|
45 | - public function deleting($model) |
|
46 | - { |
|
47 | - // |
|
48 | - } |
|
49 | - |
|
50 | - public function deleted($model) |
|
51 | - { |
|
52 | - // |
|
53 | - } |
|
8 | + public function saving($model) |
|
9 | + { |
|
10 | + // |
|
11 | + } |
|
12 | + |
|
13 | + public function saved($model) |
|
14 | + { |
|
15 | + // |
|
16 | + } |
|
17 | + |
|
18 | + public function creating($model) |
|
19 | + { |
|
20 | + // |
|
21 | + } |
|
22 | + |
|
23 | + /** |
|
24 | + * Publish the created notification to the redis server |
|
25 | + * to broadcast it to all listners. |
|
26 | + * |
|
27 | + * @param object $model the model beign created. |
|
28 | + * @return void |
|
29 | + */ |
|
30 | + public function created($model) |
|
31 | + { |
|
32 | + \Redis::publish('notification', json_encode($model->toArray())); |
|
33 | + } |
|
34 | + |
|
35 | + public function updating($model) |
|
36 | + { |
|
37 | + // |
|
38 | + } |
|
39 | + |
|
40 | + public function updated($model) |
|
41 | + { |
|
42 | + // |
|
43 | + } |
|
44 | + |
|
45 | + public function deleting($model) |
|
46 | + { |
|
47 | + // |
|
48 | + } |
|
49 | + |
|
50 | + public function deleted($model) |
|
51 | + { |
|
52 | + // |
|
53 | + } |
|
54 | 54 | |
55 | 55 | } |
56 | 56 | \ No newline at end of file |
@@ -6,26 +6,26 @@ |
||
6 | 6 | |
7 | 7 | class ApiSkeletonServiceProvider extends ServiceProvider |
8 | 8 | { |
9 | - /** |
|
10 | - * Perform post-registration booting of services. |
|
11 | - * |
|
12 | - * @return void |
|
13 | - */ |
|
14 | - public function boot() |
|
15 | - { |
|
16 | - $this->publishes([ |
|
17 | - __DIR__.'/Modules' => app_path('Modules'), |
|
18 | - ]); |
|
9 | + /** |
|
10 | + * Perform post-registration booting of services. |
|
11 | + * |
|
12 | + * @return void |
|
13 | + */ |
|
14 | + public function boot() |
|
15 | + { |
|
16 | + $this->publishes([ |
|
17 | + __DIR__.'/Modules' => app_path('Modules'), |
|
18 | + ]); |
|
19 | 19 | |
20 | - } |
|
20 | + } |
|
21 | 21 | |
22 | - /** |
|
23 | - * Register any package services. |
|
24 | - * |
|
25 | - * @return void |
|
26 | - */ |
|
27 | - public function register() |
|
28 | - { |
|
29 | - // |
|
30 | - } |
|
22 | + /** |
|
23 | + * Register any package services. |
|
24 | + * |
|
25 | + * @return void |
|
26 | + */ |
|
27 | + public function register() |
|
28 | + { |
|
29 | + // |
|
30 | + } |
|
31 | 31 | } |
32 | 32 | \ No newline at end of file |
@@ -5,44 +5,44 @@ |
||
5 | 5 | */ |
6 | 6 | class LogObserver { |
7 | 7 | |
8 | - public function saving($model) |
|
9 | - { |
|
10 | - // |
|
11 | - } |
|
12 | - |
|
13 | - public function saved($model) |
|
14 | - { |
|
15 | - // |
|
16 | - } |
|
17 | - |
|
18 | - public function creating($model) |
|
19 | - { |
|
20 | - // |
|
21 | - } |
|
22 | - |
|
23 | - public function created($model) |
|
24 | - { |
|
25 | - // |
|
26 | - } |
|
27 | - |
|
28 | - public function updating($model) |
|
29 | - { |
|
30 | - // |
|
31 | - } |
|
32 | - |
|
33 | - public function updated($model) |
|
34 | - { |
|
35 | - // |
|
36 | - } |
|
37 | - |
|
38 | - public function deleting($model) |
|
39 | - { |
|
40 | - // |
|
41 | - } |
|
42 | - |
|
43 | - public function deleted($model) |
|
44 | - { |
|
45 | - // |
|
46 | - } |
|
8 | + public function saving($model) |
|
9 | + { |
|
10 | + // |
|
11 | + } |
|
12 | + |
|
13 | + public function saved($model) |
|
14 | + { |
|
15 | + // |
|
16 | + } |
|
17 | + |
|
18 | + public function creating($model) |
|
19 | + { |
|
20 | + // |
|
21 | + } |
|
22 | + |
|
23 | + public function created($model) |
|
24 | + { |
|
25 | + // |
|
26 | + } |
|
27 | + |
|
28 | + public function updating($model) |
|
29 | + { |
|
30 | + // |
|
31 | + } |
|
32 | + |
|
33 | + public function updated($model) |
|
34 | + { |
|
35 | + // |
|
36 | + } |
|
37 | + |
|
38 | + public function deleting($model) |
|
39 | + { |
|
40 | + // |
|
41 | + } |
|
42 | + |
|
43 | + public function deleted($model) |
|
44 | + { |
|
45 | + // |
|
46 | + } |
|
47 | 47 | |
48 | 48 | } |
49 | 49 | \ No newline at end of file |