@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace plunner\Http\Controllers\Companies\Employees; |
4 | 4 | |
5 | -use Illuminate\Http\Request; |
|
6 | 5 | use plunner\Company; |
7 | 6 | use plunner\Employee; |
8 | 7 | use plunner\Http\Controllers\Controller; |
@@ -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 |
@@ -4,9 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Illuminate\Http\Request; |
6 | 6 | use plunner\Company; |
7 | -use plunner\Employee; |
|
8 | 7 | use plunner\Http\Controllers\Controller; |
9 | -use plunner\Http\Requests\Companies\EmployeeRequest; |
|
10 | 8 | |
11 | 9 | |
12 | 10 | class PlannersController extends Controller |
@@ -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 |
@@ -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 |
@@ -4,9 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Illuminate\Http\Request; |
6 | 6 | use plunner\Company; |
7 | -use plunner\Employee; |
|
8 | 7 | use plunner\Http\Controllers\Controller; |
9 | -use plunner\Http\Requests\Companies\EmployeeRequest; |
|
10 | 8 | |
11 | 9 | |
12 | 10 | class PlannersController extends Controller |
@@ -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 |
@@ -18,66 +18,66 @@ |
||
18 | 18 | /** |
19 | 19 | * Companies |
20 | 20 | */ |
21 | -Route::group(['namespace' => 'Companies', 'prefix' => 'companies'], function() { |
|
21 | +Route::group([ 'namespace' => 'Companies', 'prefix' => 'companies' ], function() { |
|
22 | 22 | |
23 | 23 | //\Auth |
24 | 24 | |
25 | - Route::group(['namespace' => 'Auth'], function() { |
|
26 | - Route::group(['prefix' => 'auth'], function () { |
|
25 | + Route::group([ 'namespace' => 'Auth' ], function() { |
|
26 | + Route::group([ 'prefix' => 'auth' ], function() { |
|
27 | 27 | // Authentication routes... |
28 | - Route::post('login', ['as' => 'companies.auth.login','uses'=>'AuthController@postLogin']); |
|
28 | + Route::post('login', [ 'as' => 'companies.auth.login', 'uses'=>'AuthController@postLogin' ]); |
|
29 | 29 | |
30 | 30 | // Registration routes... |
31 | - Route::post('register', ['as' => 'companies.auth.register', 'uses'=>'AuthController@postRegister']); |
|
31 | + Route::post('register', [ 'as' => 'companies.auth.register', 'uses'=>'AuthController@postRegister' ]); |
|
32 | 32 | |
33 | 33 | }); |
34 | 34 | |
35 | - Route::group(['prefix' => 'password'], function () { |
|
35 | + Route::group([ 'prefix' => 'password' ], function() { |
|
36 | 36 | // Password reset link request routes... |
37 | - Route::post('email', ['as' => 'companies.auth.email', 'uses'=>'PasswordController@postEmail']); |
|
37 | + Route::post('email', [ 'as' => 'companies.auth.email', 'uses'=>'PasswordController@postEmail' ]); |
|
38 | 38 | |
39 | 39 | // Password reset routes... |
40 | - Route::post('reset', ['as' => 'companies.auth.reset', 'uses'=>'PasswordController@postReset']); |
|
40 | + Route::post('reset', [ 'as' => 'companies.auth.reset', 'uses'=>'PasswordController@postReset' ]); |
|
41 | 41 | }); |
42 | 42 | }); |
43 | 43 | |
44 | - Route::group(['namespace' => 'Employees'], function() { |
|
45 | - Route::resource('employees', 'EmployeesController', ['except' => ['create', 'edit']]); |
|
44 | + Route::group([ 'namespace' => 'Employees' ], function() { |
|
45 | + Route::resource('employees', 'EmployeesController', [ 'except' => [ 'create', 'edit' ] ]); |
|
46 | 46 | }); |
47 | 47 | |
48 | - Route::group(['namespace' => 'Groups'], function() { |
|
49 | - Route::resource('groups', 'GroupsController', ['except' => ['create', 'edit']]); |
|
50 | - Route::resource('groups.employees', 'EmployeesController', ['except' => ['create', 'edit']]); |
|
51 | - Route::resource('groups.planners', 'PlannersController', ['except' => ['create', 'edit']]); |
|
48 | + Route::group([ 'namespace' => 'Groups' ], function() { |
|
49 | + Route::resource('groups', 'GroupsController', [ 'except' => [ 'create', 'edit' ] ]); |
|
50 | + Route::resource('groups.employees', 'EmployeesController', [ 'except' => [ 'create', 'edit' ] ]); |
|
51 | + Route::resource('groups.planners', 'PlannersController', [ 'except' => [ 'create', 'edit' ] ]); |
|
52 | 52 | }); |
53 | 53 | |
54 | 54 | //example |
55 | - Route::resource('example', 'ExampleController', ['except' => ['create', 'edit']]); //TODO remove |
|
55 | + Route::resource('example', 'ExampleController', [ 'except' => [ 'create', 'edit' ] ]); //TODO remove |
|
56 | 56 | }); |
57 | 57 | |
58 | 58 | |
59 | 59 | /** |
60 | 60 | * Employees |
61 | 61 | */ |
62 | -Route::group(['namespace' => 'Employees', 'prefix' => 'employees'], function() { |
|
62 | +Route::group([ 'namespace' => 'Employees', 'prefix' => 'employees' ], function() { |
|
63 | 63 | //\Auth |
64 | 64 | |
65 | - Route::group(['namespace' => 'Auth'], function() { |
|
66 | - Route::group(['prefix' => 'auth'], function () { |
|
65 | + Route::group([ 'namespace' => 'Auth' ], function() { |
|
66 | + Route::group([ 'prefix' => 'auth' ], function() { |
|
67 | 67 | // Authentication routes... |
68 | - Route::post('login', ['as' => 'companies.auth.login', 'uses'=>'AuthController@postLogin']); |
|
68 | + Route::post('login', [ 'as' => 'companies.auth.login', 'uses'=>'AuthController@postLogin' ]); |
|
69 | 69 | |
70 | 70 | // Registration routes... |
71 | 71 | //Route::post('register', ['as' => 'companies.auth.register', 'uses'=>'AuthController@postRegister']); //the registration is managed by the company |
72 | 72 | |
73 | 73 | }); |
74 | 74 | |
75 | - Route::group(['prefix' => 'password'], function () { |
|
75 | + Route::group([ 'prefix' => 'password' ], function() { |
|
76 | 76 | // Password reset link request routes... |
77 | - Route::post('email', ['as' => 'companies.auth.email', 'uses'=>'PasswordController@postEmail']); |
|
77 | + Route::post('email', [ 'as' => 'companies.auth.email', 'uses'=>'PasswordController@postEmail' ]); |
|
78 | 78 | |
79 | 79 | // Password reset routes... |
80 | - Route::post('reset', ['as' => 'companies.auth.reset', 'uses'=>'PasswordController@postReset']); |
|
80 | + Route::post('reset', [ 'as' => 'companies.auth.reset', 'uses'=>'PasswordController@postReset' ]); |
|
81 | 81 | }); |
82 | 82 | }); |
83 | 83 |
@@ -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 | { |