Completed
Pull Request — master (#91)
by Tim
04:34
created
app/Departments.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 class Departments extends Model
8 8
 {
9
-    protected $fillable = ['name', 'manager'];
9
+    protected $fillable = [ 'name', 'manager' ];
10 10
 
11 11
     /**
12 12
      * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
Please login to merge, or discard this patch.
app/Roles.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,5 +19,5 @@
 block discarded – undo
19 19
      *
20 20
      * @var array
21 21
      */
22
-    protected $fillable = ['name'];
22
+    protected $fillable = [ 'name' ];
23 23
 }
Please login to merge, or discard this patch.
app/Http/Controllers/RolesController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      */
16 16
     public function index()
17 17
     {
18
-    	$data['roles'] = Roles::all();
18
+    	$data[ 'roles' ] = Roles::all();
19 19
     	return view('roles.index', $data);
20 20
     }
21 21
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     public function search(Request $request)
29 29
     {
30 30
         $term = $request->get('term');
31
-        $data['roles'] = Roles::where('name', 'LIKE', "$term")->get();
31
+        $data[ 'roles' ] = Roles::where('name', 'LIKE', "$term")->get();
32 32
         return view('roles.index', $data);
33 33
     }
34 34
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function show($id)
42 42
     {
43
-        $data['query'] = Roles::find($id);
43
+        $data[ 'query' ] = Roles::find($id);
44 44
         return view('', $data);
45 45
     }
46 46
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function edit($id)
73 73
     {
74
-        $data['query'] = Roles::find($id);
74
+        $data[ 'query' ] = Roles::find($id);
75 75
         return view('', $data)
76 76
     }
77 77
 
Please login to merge, or discard this patch.
app/Http/Controllers/WelcomeController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
      */
26 26
     public function index()
27 27
     {
28
-        $data["department"] = Departments::all();
29
-        $data["agents"] = User::all();
28
+        $data[ "department" ] = Departments::all();
29
+        $data[ "agents" ] = User::all();
30 30
         return view('welcome', $data);
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
app/Http/Controllers/StaffController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function create()
38 38
     {
39
-        $data['departments'] = Departments::all();
39
+        $data[ 'departments' ] = Departments::all();
40 40
         return view('staff.create', $data);
41 41
     }
42 42
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function store(Requests\NewStaffValidator $input)
52 52
     {
53
-        $newUser = User::create($input->except(['_token', 'department']))->id;
53
+        $newUser = User::create($input->except([ '_token', 'department' ]))->id;
54 54
         User::find($newUser)->departments()->attach($input->department);
55 55
 
56 56
         session()->flash('message', 'New staff member created');
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function edit($id)
80 80
     {
81
-        $data['query'] = User::find($id);
81
+        $data[ 'query' ] = User::find($id);
82 82
         return view('staff.edit', $data);
83 83
     }
84 84
 
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function index()
91 91
 	{
92
-        $data["departments"] = Departments::all();
93
-		$data['users'] = User::paginate(15);
92
+        $data[ "departments" ] = Departments::all();
93
+		$data[ 'users' ] = User::paginate(15);
94 94
     	return view('users/index', $data);
95 95
     }
96 96
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     public function profile()
131 131
     {
132 132
         $id = auth()->user()->id;
133
-        $data['tokens'] = ApiKey::where('user_id', $id)->get();
133
+        $data[ 'tokens' ] = ApiKey::where('user_id', $id)->get();
134 134
     	return view('users/profile', $data);
135 135
     }
136 136
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     public function destroy($id)
144 144
     {
145 145
         $user = User::find($id);
146
-        $user->roles()->sync([]);
146
+        $user->roles()->sync([ ]);
147 147
 
148 148
         User::destroy($id);
149 149
         session()->flash('message', 'User deleted');
@@ -154,12 +154,12 @@  discard block
 block discarded – undo
154 154
     public function get_roles()
155 155
     {
156 156
         $items = Roles::all();
157
-        $data2 = [];
158
-        foreach($items as $role)
157
+        $data2 = [ ];
158
+        foreach ($items as $role)
159 159
         {
160
-         $data2[] = [
161
-        'value' => $role["id"],
162
-        'text'  => $role["name"]
160
+         $data2[ ] = [
161
+        'value' => $role[ "id" ],
162
+        'text'  => $role[ "name" ]
163 163
         ];
164 164
 
165 165
         }
Please login to merge, or discard this patch.