Completed
Pull Request — master (#91)
by Tim
04:34
created
app/Http/Controllers/StaffController.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
      * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
89 89
      */
90 90
     public function index()
91
-	{
91
+    {
92 92
         $data["departments"] = Departments::all();
93
-		$data['users'] = User::paginate(15);
94
-    	return view('users/index', $data);
93
+        $data['users'] = User::paginate(15);
94
+        return view('users/index', $data);
95 95
     }
96 96
 
97 97
     /**
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     {
132 132
         $id = auth()->user()->id;
133 133
         $data['tokens'] = ApiKey::where('user_id', $id)->get();
134
-    	return view('users/profile', $data);
134
+        return view('users/profile', $data);
135 135
     }
136 136
 
137 137
     /**
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         $data2 = [];
158 158
         foreach($items as $role)
159 159
         {
160
-         $data2[] = [
160
+            $data2[] = [
161 161
         'value' => $role["id"],
162 162
         'text'  => $role["name"]
163 163
         ];
Please login to merge, or discard this 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.