@@ -20,8 +20,8 @@ |
||
20 | 20 | */ |
21 | 21 | public function __construct() |
22 | 22 | { |
23 | - config(['auth.model' => \plunner\Company::class]); |
|
24 | - config(['jwt.user' => \plunner\Company::class]); |
|
23 | + config([ 'auth.model' => \plunner\Company::class ]); |
|
24 | + config([ 'jwt.user' => \plunner\Company::class ]); |
|
25 | 25 | $this->middleware('jwt.authandrefresh:mode-cn'); |
26 | 26 | } |
27 | 27 |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * |
12 | 12 | * @var array |
13 | 13 | */ |
14 | - protected $fillable = ['title', 'description', 'meeting_time']; |
|
14 | + protected $fillable = [ 'title', 'description', 'meeting_time' ]; |
|
15 | 15 | |
16 | 16 | public function employees() |
17 | 17 | { |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Illuminate\Http\Request; |
6 | 6 | |
7 | -use plunner\Http\Requests; |
|
8 | 7 | use plunner\Http\Controllers\Controller; |
9 | 8 | |
10 | 9 | class GroupsController extends Controller |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * |
12 | 12 | * @var array |
13 | 13 | */ |
14 | - protected $fillable = ['name']; |
|
14 | + protected $fillable = [ 'name' ]; |
|
15 | 15 | |
16 | 16 | public function employees() |
17 | 17 | { |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * |
12 | 12 | * @var array |
13 | 13 | */ |
14 | - protected $fillable = ['time_start', 'time_end']; |
|
14 | + protected $fillable = [ 'time_start', 'time_end' ]; |
|
15 | 15 | |
16 | 16 | public function employees() |
17 | 17 | { |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Created by PhpStorm. |
|
4 | - * User: Claudio Cardinale <[email protected]> |
|
5 | - * Date: 24/11/15 |
|
6 | - * Time: 21.58 |
|
7 | - * This program is free software; you can redistribute it and/or |
|
8 | - * modify it under the terms of the GNU General Public License |
|
9 | - * as published by the Free Software Foundation; either version 2 |
|
10 | - * of the License, or (at your option) any later version. |
|
11 | - * This program is distributed in the hope that it will be useful, |
|
12 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 | - * GNU General Public License for more details. |
|
15 | - * You should have received a copy of the GNU General Public License |
|
16 | - * along with this program; if not, write to the Free Software |
|
17 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
18 | - */ |
|
3 | + * Created by PhpStorm. |
|
4 | + * User: Claudio Cardinale <[email protected]> |
|
5 | + * Date: 24/11/15 |
|
6 | + * Time: 21.58 |
|
7 | + * This program is free software; you can redistribute it and/or |
|
8 | + * modify it under the terms of the GNU General Public License |
|
9 | + * as published by the Free Software Foundation; either version 2 |
|
10 | + * of the License, or (at your option) any later version. |
|
11 | + * This program is distributed in the hope that it will be useful, |
|
12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 | + * GNU General Public License for more details. |
|
15 | + * You should have received a copy of the GNU General Public License |
|
16 | + * along with this program; if not, write to the Free Software |
|
17 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | namespace plunner; |
21 | 21 |
@@ -4,9 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Illuminate\Http\Request; |
6 | 6 | |
7 | -use plunner\Group; |
|
8 | -use plunner\Employee; |
|
9 | -use plunner\Http\Requests; |
|
10 | 7 | use plunner\Http\Controllers\Controller; |
11 | 8 | |
12 | 9 | class GroupsController extends Controller |
@@ -46,7 +46,7 @@ |
||
46 | 46 | * |
47 | 47 | * @var string |
48 | 48 | */ |
49 | - //protected $table = 'employees'; |
|
49 | + //protected $table = 'employees'; |
|
50 | 50 | |
51 | 51 | /** |
52 | 52 | * The attributes that are mass assignable. |
@@ -53,14 +53,14 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @var array |
55 | 55 | */ |
56 | - protected $fillable = ['name', 'email', 'password']; |
|
56 | + protected $fillable = [ 'name', 'email', 'password' ]; |
|
57 | 57 | |
58 | 58 | /** |
59 | 59 | * The attributes excluded from the model's JSON form. |
60 | 60 | * |
61 | 61 | * @var array |
62 | 62 | */ |
63 | - protected $hidden = ['password', 'remember_token']; |
|
63 | + protected $hidden = [ 'password', 'remember_token' ]; |
|
64 | 64 | |
65 | 65 | /** |
66 | 66 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | public function belongsToGroup(Group $group) |
115 | 115 | { |
116 | 116 | $group = $this->groups()->where('id', $group->id)->first(); |
117 | - if(is_object($group) && $group->exists) |
|
117 | + if (is_object($group) && $group->exists) |
|
118 | 118 | return true; |
119 | 119 | return false; |
120 | 120 | } |
@@ -114,8 +114,9 @@ |
||
114 | 114 | public function belongsToGroup(Group $group) |
115 | 115 | { |
116 | 116 | $group = $this->groups()->where('id', $group->id)->first(); |
117 | - if(is_object($group) && $group->exists) |
|
118 | - return true; |
|
117 | + if(is_object($group) && $group->exists) { |
|
118 | + return true; |
|
119 | + } |
|
119 | 120 | return false; |
120 | 121 | } |
121 | 122 |
@@ -51,8 +51,9 @@ |
||
51 | 51 | |
52 | 52 | public function getPlannerNameAttribute() |
53 | 53 | { |
54 | - if(is_object($this->planner) && $this->planner->exists) |
|
55 | - return $this->planner->name; |
|
54 | + if(is_object($this->planner) && $this->planner->exists) { |
|
55 | + return $this->planner->name; |
|
56 | + } |
|
56 | 57 | } |
57 | 58 | |
58 | 59 | /** |
@@ -37,21 +37,21 @@ |
||
37 | 37 | * |
38 | 38 | * @var array |
39 | 39 | */ |
40 | - protected $fillable = ['name', 'description', 'planner_id']; |
|
40 | + protected $fillable = [ 'name', 'description', 'planner_id' ]; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * @var array |
44 | 44 | */ |
45 | - protected $hidden = ['planner']; |
|
45 | + protected $hidden = [ 'planner' ]; |
|
46 | 46 | |
47 | 47 | /** |
48 | 48 | * @var array |
49 | 49 | */ |
50 | - protected $appends = ['planner_name']; |
|
50 | + protected $appends = [ 'planner_name' ]; |
|
51 | 51 | |
52 | 52 | public function getPlannerNameAttribute() |
53 | 53 | { |
54 | - if(is_object($this->planner) && $this->planner->exists) |
|
54 | + if (is_object($this->planner) && $this->planner->exists) |
|
55 | 55 | return $this->planner->name; |
56 | 56 | } |
57 | 57 |