@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | public function update($id, Request $request) |
31 | 31 | { |
32 | - $this->validate($request, [ 'value' => 'required' ]); |
|
32 | + $this->validate($request, ['value' => 'required']); |
|
33 | 33 | |
34 | 34 | $move = Base::getSettingsRepository()->findOrFail($id); |
35 | 35 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | $after = $move->value; |
41 | 41 | |
42 | - Base::Log('Website settings changed. Changed "' . $move->friendly_name . '" value from "' . $before . '" to "' . $after . '"'); |
|
42 | + Base::Log('Website settings changed. Changed "'.$move->friendly_name.'" value from "'.$before.'" to "'.$after.'"'); |
|
43 | 43 | |
44 | 44 | return redirect('admin/settings'); |
45 | 45 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | public function getForgotPasswordConfirm($userId, $passwordResetCode) |
95 | 95 | { |
96 | 96 | // Find the user using the password reset code |
97 | - if(!$user = Sentinel::findById($userId)) |
|
97 | + if (!$user = Sentinel::findById($userId)) |
|
98 | 98 | { |
99 | 99 | // Redirect to the forgot password page |
100 | 100 | return Redirect::route('forgot-password')->with('error', Lang::get('base.auth.forgot_password_confirm.error')); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | } |
134 | 134 | |
135 | 135 | // Find the user using the password reset code |
136 | - if(!$user = Sentinel::findById($userId)) |
|
136 | + if (!$user = Sentinel::findById($userId)) |
|
137 | 137 | { |
138 | 138 | // Redirect to the forgot password page |
139 | 139 | return Redirect::route('login')->with('error', Lang::get('base.auth.activate.error')); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | return back()->withInput()->withErrors($validator); |
186 | 186 | } |
187 | 187 | try { |
188 | - foreach(Sentinel::createModel()->getLoginNames() as $loginName) |
|
188 | + foreach (Sentinel::createModel()->getLoginNames() as $loginName) |
|
189 | 189 | { |
190 | 190 | $data = array( |
191 | 191 | $loginName => Input::only('email')["email"], |
@@ -193,11 +193,11 @@ discard block |
||
193 | 193 | ); |
194 | 194 | |
195 | 195 | // Try to log the user in |
196 | - if(Sentinel::authenticate($data, Input::get('remember-me', false))) |
|
196 | + if (Sentinel::authenticate($data, Input::get('remember-me', false))) |
|
197 | 197 | { |
198 | 198 | $user = Sentinel::check(); |
199 | 199 | $user->update(['ip' => Request::ip()]); |
200 | - Base::Log($user->username . ' (' . $user->first_name . ' ' . $user->last_name . ') logged in with IP ' . Request::ip() ); |
|
200 | + Base::Log($user->username.' ('.$user->first_name.' '.$user->last_name.') logged in with IP '.Request::ip()); |
|
201 | 201 | |
202 | 202 | // Redirect to the dashboard page |
203 | 203 | return Redirect::route("home")->with('success', Lang::get('base.auth.signin.success')); |
@@ -209,9 +209,9 @@ discard block |
||
209 | 209 | $this->messageBag->add('email', Lang::get('base.auth.account.not_activated')); |
210 | 210 | } catch (ThrottlingException $e) { |
211 | 211 | $delay = $e->getDelay(); |
212 | - $this->messageBag->add('email', Lang::get('base.auth.account.suspended', compact('delay' ))); |
|
212 | + $this->messageBag->add('email', Lang::get('base.auth.account.suspended', compact('delay'))); |
|
213 | 213 | } |
214 | - Base::Log('Login attempt registred for ' . Input::only('email')["email"] . ' from IP ' . Request::ip() ); |
|
214 | + Base::Log('Login attempt registred for '.Input::only('email')["email"].' from IP '.Request::ip()); |
|
215 | 215 | |
216 | 216 | // Ooops.. something went wrong |
217 | 217 | return back()->withInput()->withErrors($this->messageBag); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | $rules = array(); |
246 | 246 | |
247 | 247 | // Declare the rules for the form validation |
248 | - foreach(Sentinel::createModel()->getRegisterFields() as $fieldid => $field) |
|
248 | + foreach (Sentinel::createModel()->getRegisterFields() as $fieldid => $field) |
|
249 | 249 | $rules[$fieldid] = $field['validator']; |
250 | 250 | |
251 | 251 | $rules['g-recaptcha-response'] = 'required'; |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | $data = array(); |
269 | 269 | |
270 | 270 | // Set the data to the user from the User class |
271 | - foreach(Sentinel::createModel()->getRegisterFields() as $fieldid => $field) |
|
271 | + foreach (Sentinel::createModel()->getRegisterFields() as $fieldid => $field) |
|
272 | 272 | $data[$fieldid] = Input::get($fieldid); |
273 | 273 | |
274 | 274 | // Set the standard data to the user |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | $testing = Sentinel::createModel()->getRegisterFields(); |
289 | 289 | $user = Sentinel::findById($user->id); |
290 | 290 | |
291 | - foreach($data as $fieldid => $field) |
|
291 | + foreach ($data as $fieldid => $field) |
|
292 | 292 | if (!isset($testing[$fieldid]) || $testing[$fieldid]['save'] == true) |
293 | 293 | $user[$fieldid] = $field; |
294 | 294 | |
@@ -314,18 +314,18 @@ discard block |
||
314 | 314 | ); |
315 | 315 | |
316 | 316 | // Send the activation code through email |
317 | - Mail::queue('emails.auth.register-activate', $data, function ($m) use ($user) { |
|
318 | - $m->to($user->email, $user->first_name . ' ' . $user->last_name); |
|
319 | - $m->subject(Lang::get('base.mails.welcome') . ' ' . $user->first_name); |
|
317 | + Mail::queue('emails.auth.register-activate', $data, function($m) use ($user) { |
|
318 | + $m->to($user->email, $user->first_name.' '.$user->last_name); |
|
319 | + $m->subject(Lang::get('base.mails.welcome').' '.$user->first_name); |
|
320 | 320 | }); |
321 | 321 | } |
322 | 322 | |
323 | 323 | // If the administrator needs to activate the account send the user a warning saying that |
324 | 324 | if ($adminActivation) |
325 | 325 | { |
326 | - Mail::queue('emails.auth.register-admin-activate', ['user' => $user], function ($m) use ($user) { |
|
327 | - $m->to($user->email, $user->first_name . ' ' . $user->last_name); |
|
328 | - $m->subject(Lang::get('base.mails.welcome') . ' ' . $user->first_name); |
|
326 | + Mail::queue('emails.auth.register-admin-activate', ['user' => $user], function($m) use ($user) { |
|
327 | + $m->to($user->email, $user->first_name.' '.$user->last_name); |
|
328 | + $m->subject(Lang::get('base.mails.welcome').' '.$user->first_name); |
|
329 | 329 | }); |
330 | 330 | } |
331 | 331 | |
@@ -337,22 +337,22 @@ discard block |
||
337 | 337 | if (Activation::complete($user, $activation->code)) { |
338 | 338 | Sentinel::login($user, false); |
339 | 339 | |
340 | - Mail::queue('emails.auth.activated', ['user' => $user], function ($m) use ($user) { |
|
341 | - $m->to($user->email, $user->first_name . ' ' . $user->last_name); |
|
342 | - $m->subject(Lang::get('base.mails.welcome') . ' ' . $user->first_name); |
|
340 | + Mail::queue('emails.auth.activated', ['user' => $user], function($m) use ($user) { |
|
341 | + $m->to($user->email, $user->first_name.' '.$user->last_name); |
|
342 | + $m->subject(Lang::get('base.mails.welcome').' '.$user->first_name); |
|
343 | 343 | }); |
344 | 344 | } |
345 | 345 | } |
346 | 346 | |
347 | - Base::Log('New account registred for ' . $user->username . ' (' . $user->first_name . ' ' . $user->last_name . ') from IP ' . Request::ip() ); |
|
347 | + Base::Log('New account registred for '.$user->username.' ('.$user->first_name.' '.$user->last_name.') from IP '.Request::ip()); |
|
348 | 348 | |
349 | 349 | // Redirect to the home page with success menu |
350 | - return Redirect::to("login")->with('success', Lang::get('base.auth.signup.success') . $adminActivation ? Lang::get('base.auth.signup.admin') : $userActivation ? Lang::get('base.auth.signup.self') : Lang::get('base.auth.signup.ready')); |
|
350 | + return Redirect::to("login")->with('success', Lang::get('base.auth.signup.success').$adminActivation ? Lang::get('base.auth.signup.admin') : $userActivation ? Lang::get('base.auth.signup.self') : Lang::get('base.auth.signup.ready')); |
|
351 | 351 | } catch (UserExistsException $e) { |
352 | 352 | $this->messageBag->add('email', Lang::get('base.auth.account.already_exists')); |
353 | 353 | } |
354 | 354 | |
355 | - Base::Log('New account registration attempt from IP ' . Request::ip() ); |
|
355 | + Base::Log('New account registration attempt from IP '.Request::ip()); |
|
356 | 356 | |
357 | 357 | // Ooops.. something went wrong |
358 | 358 | return Redirect::back()->withInput()->withErrors($this->messageBag); |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | // Get the user password recovery code |
383 | 383 | $user = Sentinel::findByCredentials(['email' => Input::get('email')]); |
384 | 384 | |
385 | - if($user) |
|
385 | + if ($user) |
|
386 | 386 | { |
387 | 387 | //get reminder for user |
388 | 388 | $reminder = Reminder::exists($user) ?: Reminder::create($user); |
@@ -390,14 +390,14 @@ discard block |
||
390 | 390 | // Data to be used on the email view |
391 | 391 | $data = array( |
392 | 392 | 'user' => $user, |
393 | - 'forgotPasswordUrl' => URL::route('forgot-password-confirm',[$user->id, $reminder->code]), |
|
393 | + 'forgotPasswordUrl' => URL::route('forgot-password-confirm', [$user->id, $reminder->code]), |
|
394 | 394 | ); |
395 | 395 | |
396 | - Base::Log('Forgot password request for ' . $user->username . ' (' . $user->first_name . ' ' . $user->last_name . ') from IP ' . Request::ip() ); |
|
396 | + Base::Log('Forgot password request for '.$user->username.' ('.$user->first_name.' '.$user->last_name.') from IP '.Request::ip()); |
|
397 | 397 | |
398 | 398 | // Send the activation code through email |
399 | - Mail::queue('emails.auth.forgot-password', $data, function ($m) use ($user) { |
|
400 | - $m->to($user->email, $user->first_name . ' ' . $user->last_name); |
|
399 | + Mail::queue('emails.auth.forgot-password', $data, function($m) use ($user) { |
|
400 | + $m->to($user->email, $user->first_name.' '.$user->last_name); |
|
401 | 401 | $m->subject(Lang::get('base.mails.recovery')); |
402 | 402 | }); |
403 | 403 | } |
@@ -427,26 +427,26 @@ discard block |
||
427 | 427 | // If validation fails, we'll exit the operation now. |
428 | 428 | if ($validator->fails()) { |
429 | 429 | // Ooops.. something went wrong |
430 | - return Redirect::route('forgot-password-confirm', compact(['userId','passwordResetCode']))->withInput()->withErrors($validator); |
|
430 | + return Redirect::route('forgot-password-confirm', compact(['userId', 'passwordResetCode']))->withInput()->withErrors($validator); |
|
431 | 431 | } |
432 | 432 | |
433 | 433 | // Find the user using the password reset code |
434 | 434 | $user = Sentinel::findById($userId); |
435 | - if(!$reminder = Reminder::complete($user, $passwordResetCode, Input::get('password'))) |
|
435 | + if (!$reminder = Reminder::complete($user, $passwordResetCode, Input::get('password'))) |
|
436 | 436 | { |
437 | - Base::Log('Forgot password confirm failed for ' . $user->username . ' (' . $user->first_name . ' ' . $user->last_name . ') from IP ' . Request::ip() ); |
|
437 | + Base::Log('Forgot password confirm failed for '.$user->username.' ('.$user->first_name.' '.$user->last_name.') from IP '.Request::ip()); |
|
438 | 438 | |
439 | 439 | // Ooops.. something went wrong |
440 | 440 | return Redirect::route('login')->with('error', Lang::get('base.auth.forgot_password_confirm.error')); |
441 | 441 | } else { |
442 | 442 | // Send the activation code through email |
443 | - Mail::queue('emails.auth.password-changed', [ 'user' => $user], function ($m) use ($user) { |
|
444 | - $m->to($user->email, $user->first_name . ' ' . $user->last_name); |
|
443 | + Mail::queue('emails.auth.password-changed', ['user' => $user], function($m) use ($user) { |
|
444 | + $m->to($user->email, $user->first_name.' '.$user->last_name); |
|
445 | 445 | $m->subject(Lang::get('base.mails.password_changed')); |
446 | 446 | }); |
447 | 447 | } |
448 | 448 | |
449 | - Base::Log('Forgot password confirmed for ' . $user->username . ' (' . $user->first_name . ' ' . $user->last_name . ') from IP ' . Request::ip() ); |
|
449 | + Base::Log('Forgot password confirmed for '.$user->username.' ('.$user->first_name.' '.$user->last_name.') from IP '.Request::ip()); |
|
450 | 450 | |
451 | 451 | // Password successfully reseted |
452 | 452 | return Redirect::route('login')->with('success', Lang::get('base.auth.forgot_password_confirm.success')); |
@@ -179,7 +179,7 @@ |
||
179 | 179 | 'BlogPost.contents' => 1, |
180 | 180 | ], |
181 | 181 | 'joins' => [ |
182 | - 'BlogPost' => [ 'User.id', 'BlogPost.author' ], |
|
182 | + 'BlogPost' => ['User.id', 'BlogPost.author'], |
|
183 | 183 | ], |
184 | 184 | ]; |
185 | 185 |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | if ($value > 0) |
39 | 39 | if ($user = Sentinel::findUserById($value)) |
40 | 40 | if ($user != null) |
41 | - return $user->first_name . ' ' . $user->last_name . ' (ID: ' . $user->id . ')'; |
|
41 | + return $user->first_name.' '.$user->last_name.' (ID: '.$user->id.')'; |
|
42 | 42 | |
43 | 43 | return $value; |
44 | 44 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | if ($value > 0) |
55 | 55 | if ($user = Sentinel::findUserById($value)) |
56 | 56 | if ($user != null) |
57 | - return $user->first_name . ' ' . $user->last_name . ' (ID: ' . $user->id . ')'; |
|
57 | + return $user->first_name.' '.$user->last_name.' (ID: '.$user->id.')'; |
|
58 | 58 | |
59 | 59 | return $value; |
60 | 60 | } |
@@ -28,13 +28,13 @@ |
||
28 | 28 | $str = explode("* ", $this->description); |
29 | 29 | $choices = array(); |
30 | 30 | |
31 | - foreach($str as $st) |
|
31 | + foreach ($str as $st) |
|
32 | 32 | { |
33 | 33 | preg_match('/(?P<digit>\d+) - (?P<name>\w+)/', $st, $matches); |
34 | 34 | if (sizeof($matches) > 0) { |
35 | - $st = str_replace("*/","",$st); |
|
36 | - $st = str_replace("/*","",$st); |
|
37 | - $choices[$matches[1]] = explode($matches[1] . ' - ', $st)[1]; |
|
35 | + $st = str_replace("*/", "", $st); |
|
36 | + $st = str_replace("/*", "", $st); |
|
37 | + $choices[$matches[1]] = explode($matches[1].' - ', $st)[1]; |
|
38 | 38 | } |
39 | 39 | } |
40 | 40 |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | public function up() |
15 | 15 | { |
16 | 16 | |
17 | - Schema::create('User', function (Blueprint $table) { |
|
17 | + Schema::create('User', function(Blueprint $table) { |
|
18 | 18 | $table->increments('id'); |
19 | 19 | $table->string('username', 25)->nullable()->unique(); |
20 | 20 | $table->string('password', 60)->nullable(); |
@@ -37,11 +37,11 @@ discard block |
||
37 | 37 | $table->creation(); |
38 | 38 | }); |
39 | 39 | |
40 | - Schema::table('User', function (Blueprint $table) { |
|
40 | + Schema::table('User', function(Blueprint $table) { |
|
41 | 41 | $table->creationRelation(); |
42 | 42 | }); |
43 | 43 | |
44 | - Schema::create('Visits', function (Blueprint $table) { |
|
44 | + Schema::create('Visits', function(Blueprint $table) { |
|
45 | 45 | $table->increments('id'); |
46 | 46 | $table->string('url')->nullable(); |
47 | 47 | $table->string('ip', 15)->nullable(); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $table->timestamps(); |
61 | 61 | }); |
62 | 62 | |
63 | - Schema::create('Logs', function (Blueprint $table) { |
|
63 | + Schema::create('Logs', function(Blueprint $table) { |
|
64 | 64 | $table->increments('id'); |
65 | 65 | $table->text('log'); |
66 | 66 | $table->integer('target')->nullable(); |
@@ -69,11 +69,11 @@ discard block |
||
69 | 69 | $table->creation(); |
70 | 70 | }); |
71 | 71 | |
72 | - Schema::table('Logs', function (Blueprint $table) { |
|
72 | + Schema::table('Logs', function(Blueprint $table) { |
|
73 | 73 | $table->creationRelation(); |
74 | 74 | }); |
75 | 75 | |
76 | - Schema::create('Settings', function (Blueprint $table) { |
|
76 | + Schema::create('Settings', function(Blueprint $table) { |
|
77 | 77 | $table->increments('id'); |
78 | 78 | $table->string('friendly_name', 25); |
79 | 79 | $table->string('name', 25); |
@@ -83,11 +83,11 @@ discard block |
||
83 | 83 | $table->creation(); |
84 | 84 | }); |
85 | 85 | |
86 | - Schema::table('Settings', function (Blueprint $table) { |
|
86 | + Schema::table('Settings', function(Blueprint $table) { |
|
87 | 87 | $table->creationRelation(); |
88 | 88 | }); |
89 | 89 | |
90 | - Schema::create('Group', function (Blueprint $table) { |
|
90 | + Schema::create('Group', function(Blueprint $table) { |
|
91 | 91 | $table->increments('id'); |
92 | 92 | $table->string('name', 25); |
93 | 93 | $table->string('description', 250)->nullable(); |
@@ -101,11 +101,11 @@ discard block |
||
101 | 101 | $table->unique('slug'); |
102 | 102 | }); |
103 | 103 | |
104 | - Schema::table('Group', function (Blueprint $table) { |
|
104 | + Schema::table('Group', function(Blueprint $table) { |
|
105 | 105 | $table->creationRelation(); |
106 | 106 | }); |
107 | 107 | |
108 | - Schema::create('Group_User', function (Blueprint $table) { |
|
108 | + Schema::create('Group_User', function(Blueprint $table) { |
|
109 | 109 | $table->increments('id'); |
110 | 110 | $table->integer('user')->unsigned(); |
111 | 111 | $table->integer('group')->unsigned(); |
@@ -118,11 +118,11 @@ discard block |
||
118 | 118 | $table->foreign('group')->references('id')->on('Group'); |
119 | 119 | }); |
120 | 120 | |
121 | - Schema::table('Group_User', function (Blueprint $table) { |
|
121 | + Schema::table('Group_User', function(Blueprint $table) { |
|
122 | 122 | $table->creationRelation(); |
123 | 123 | }); |
124 | 124 | |
125 | - Schema::create('ActivityFeed', function (Blueprint $table) { |
|
125 | + Schema::create('ActivityFeed', function(Blueprint $table) { |
|
126 | 126 | $table->increments('id'); |
127 | 127 | $table->string('added_by', 150); |
128 | 128 | $table->text('activity'); |
@@ -253,7 +253,7 @@ |
||
253 | 253 | $platform = $agent->platform(); |
254 | 254 | $pversion = $agent->version($platform); |
255 | 255 | |
256 | - $browserString = $browser . ' version ' . $version . ' | ' . $platform . ' version ' . $pversion; |
|
256 | + $browserString = $browser.' version '.$version.' | '.$platform.' version '.$pversion; |
|
257 | 257 | |
258 | 258 | |
259 | 259 | $visit = $this->getVisitsRepository()->create(['url' => Request::url(), 'ip' => Request::ip(), 'browser' => $browserString]); |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * All the "restricted area" routes |
7 | 7 | * are defined here. |
8 | 8 | */ |
9 | -Route::group(array('prefix' => '/', 'middleware' => 'webPublic'), function () |
|
9 | +Route::group(array('prefix' => '/', 'middleware' => 'webPublic'), function() |
|
10 | 10 | { |
11 | 11 | |
12 | 12 | /** |
@@ -38,10 +38,10 @@ discard block |
||
38 | 38 | /* POST */ Route::post('login', 'jlourenco\base\Controllers\AuthController@postSignin'); |
39 | 39 | |
40 | 40 | /* GET */ Route::get('register', array('as' => 'register', 'uses' => 'jlourenco\base\Controllers\AuthController@getSignup')); |
41 | - /* POST */ Route::post('register', array('as' => 'register','uses' => 'jlourenco\base\Controllers\AuthController@postSignup')); |
|
41 | + /* POST */ Route::post('register', array('as' => 'register', 'uses' => 'jlourenco\base\Controllers\AuthController@postSignup')); |
|
42 | 42 | |
43 | 43 | /* GET */ Route::get('forgot-password', array('as' => 'forgot-password', 'uses' => 'jlourenco\base\Controllers\AuthController@getLostPassword')); |
44 | - /* POST */ Route::post('forgot-password', array('as' => 'forgot-password','uses' => 'jlourenco\base\Controllers\AuthController@postForgotPassword')); |
|
44 | + /* POST */ Route::post('forgot-password', array('as' => 'forgot-password', 'uses' => 'jlourenco\base\Controllers\AuthController@postForgotPassword')); |
|
45 | 45 | |
46 | 46 | # Forgot Password Confirmation |
47 | 47 | Route::get('forgot-password/{userId}/{passwordResetCode}', array('as' => 'forgot-password-confirm', 'uses' => 'jlourenco\base\Controllers\AuthController@getForgotPasswordConfirm')); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | Route::get('activate/{userId}/{activationCode}', array('as' => 'activate', 'uses' => 'jlourenco\base\Controllers\AuthController@getActivate')); |
55 | 55 | |
56 | 56 | # User account |
57 | - Route::group(array('middleware' => 'auth'), function () { |
|
57 | + Route::group(array('middleware' => 'auth'), function() { |
|
58 | 58 | Route::get('profile', array('as' => 'profile', 'uses' => 'jlourenco\base\Controllers\UsersController@myAccount')); |
59 | 59 | Route::post('profile', 'jlourenco\base\Controllers\UsersController@updateAccount'); |
60 | 60 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | * All the "restricted area" routes |
71 | 71 | * are defined here. |
72 | 72 | */ |
73 | -Route::group(array('prefix' => '/admin', 'middleware' => ['webAdmin', 'auth']), function () |
|
73 | +Route::group(array('prefix' => '/admin', 'middleware' => ['webAdmin', 'auth']), function() |
|
74 | 74 | { |
75 | 75 | |
76 | 76 | # Dashboard |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | /* POST */ Route::post('settings/{id}/edit', array('as' => 'settings.update', 'uses' => 'jlourenco\base\Controllers\SettingsController@update')); |
90 | 90 | |
91 | 91 | # User Management |
92 | - Route::group(array('prefix' => 'users'), function () { |
|
92 | + Route::group(array('prefix' => 'users'), function() { |
|
93 | 93 | Route::get('/list', array('as' => 'users', 'uses' => 'jlourenco\base\Controllers\UsersController@getAdminIndex')); |
94 | 94 | Route::get('/pending', array('as' => 'users.pending', 'uses' => 'jlourenco\base\Controllers\UsersController@getAdminPending')); |
95 | 95 | Route::get('/blocked', array('as' => 'users.blocked', 'uses' => 'jlourenco\base\Controllers\UsersController@getAdminBlocked')); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | Route::get('/list/{userId}/delete', array('as' => 'delete/user', 'uses' => 'jlourenco\base\Controllers\UsersController@getAdminDelete')); |
103 | 103 | Route::get('/list/{userId}/confirm-delete', array('as' => 'confirm-delete/user', 'uses' => 'jlourenco\base\Controllers\UsersController@getAdminModalDelete')); |
104 | 104 | Route::get('/list/{userId}/restore', array('as' => 'restore/user', 'uses' => 'jlourenco\base\Controllers\UsersController@getAdminRestore')); |
105 | - Route::get('deleted',array('as' => 'users.deleted', 'uses' => 'jlourenco\base\Controllers\UsersController@getAdminDeletedUsers')); |
|
105 | + Route::get('deleted', array('as' => 'users.deleted', 'uses' => 'jlourenco\base\Controllers\UsersController@getAdminDeletedUsers')); |
|
106 | 106 | Route::get('/list/{userId}', array('as' => 'users.show', 'uses' => 'jlourenco\base\Controllers\UsersController@adminShow')); |
107 | 107 | |
108 | 108 | Route::get('/list/{userId}/confirm-remove/{groupId}', array('as' => 'confirm-remove/group', 'uses' => 'jlourenco\base\Controllers\UsersController@getAdminModalRemoveGroup')); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | }); |
113 | 113 | |
114 | 114 | # Groups Management |
115 | - Route::group(array('prefix' => 'groups'), function () { |
|
115 | + Route::group(array('prefix' => 'groups'), function() { |
|
116 | 116 | Route::get('/list', array('as' => 'groups', 'uses' => 'jlourenco\base\Controllers\GroupsController@index')); |
117 | 117 | Route::get('/create', array('as' => 'create.group', 'uses' => 'jlourenco\base\Controllers\GroupsController@getCreate')); |
118 | 118 | Route::post('/create', 'jlourenco\base\Controllers\GroupsController@postCreate'); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $group = Sentinel::getRoleRepository()->find($id); |
64 | 64 | |
65 | 65 | // Get the group's information |
66 | - if($group == null) |
|
66 | + if ($group == null) |
|
67 | 67 | { |
68 | 68 | // Prepare the error message |
69 | 69 | $error = Lang::get('base.groups.not_found'); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | // Was the post updated? |
129 | 129 | if ($group->save()) |
130 | 130 | { |
131 | - Base::Log('Group (' . $group->id . ' - ' . $group->name . ') was edited.'); |
|
131 | + Base::Log('Group ('.$group->id.' - '.$group->name.') was edited.'); |
|
132 | 132 | |
133 | 133 | // Prepare the success message |
134 | 134 | $success = Lang::get('base.groups.changed'); |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | |
196 | 196 | $group->save(); |
197 | 197 | |
198 | - Base::Log('A new group (' . $group->id . ' - ' . $group->name . ') was created.'); |
|
198 | + Base::Log('A new group ('.$group->id.' - '.$group->name.') was created.'); |
|
199 | 199 | |
200 | 200 | // Redirect to the home page with success menu |
201 | 201 | return Redirect::route("groups")->with('success', Lang::get('base.groups.created')); |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | return Redirect::route('groups')->with('error', $error); |
249 | 249 | } |
250 | 250 | |
251 | - Base::Log('Group (' . $group->id . ' - ' . $group->name . ') was deleted.'); |
|
251 | + Base::Log('Group ('.$group->id.' - '.$group->name.') was deleted.'); |
|
252 | 252 | |
253 | 253 | // Delete the group |
254 | 254 | $group->delete(); |