@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | protected function mapWebRoutes() |
53 | 53 | { |
54 | 54 | Route::middleware('web') |
55 | - ->namespace($this->namespace) |
|
56 | - ->group(base_path('routes/web.php')); |
|
55 | + ->namespace($this->namespace) |
|
56 | + ->group(base_path('routes/web.php')); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | protected function mapApiRoutes() |
67 | 67 | { |
68 | 68 | Route::prefix('api') |
69 | - ->middleware('api') |
|
70 | - ->namespace($this->namespace) |
|
71 | - ->group(base_path('routes/api.php')); |
|
69 | + ->middleware('api') |
|
70 | + ->namespace($this->namespace) |
|
71 | + ->group(base_path('routes/api.php')); |
|
72 | 72 | } |
73 | 73 | } |
@@ -6,5 +6,5 @@ |
||
6 | 6 | |
7 | 7 | class Task extends Model |
8 | 8 | { |
9 | - protected $fillable = ['name','user_id']; |
|
9 | + protected $fillable = ['name', 'user_id']; |
|
10 | 10 | } |
@@ -7,9 +7,9 @@ discard block |
||
7 | 7 | |
8 | 8 | //si no esta declarada (function_exists('nom_funcio')) la declaro |
9 | 9 | |
10 | -if(! function_exists('initialize_task_permissions')){ |
|
10 | +if ( ! function_exists('initialize_task_permissions')) { |
|
11 | 11 | |
12 | - function initialize_task_permissions(){ |
|
12 | + function initialize_task_permissions() { |
|
13 | 13 | //Permission::create(['name'=>'list-tasks']); |
14 | 14 | //Crea només si no existeix |
15 | 15 | Permission::firstOrCreate(['name'=>'list-tasks']); |
@@ -27,20 +27,20 @@ discard block |
||
27 | 27 | } |
28 | 28 | } |
29 | 29 | |
30 | -if(! function_exists('create_user')){ |
|
30 | +if ( ! function_exists('create_user')) { |
|
31 | 31 | |
32 | - function create_user(){ |
|
32 | + function create_user() { |
|
33 | 33 | factory(User::class)->create([ |
34 | - 'name' => env('TASKS_USER_NAME','Quim González Colat'), |
|
35 | - 'email' => env('TASKS_USER_EMAIL','[email protected]'), |
|
34 | + 'name' => env('TASKS_USER_NAME', 'Quim González Colat'), |
|
35 | + 'email' => env('TASKS_USER_EMAIL', '[email protected]'), |
|
36 | 36 | 'password' => bcrypt(env('TASKS_USER_PASSWORD')) |
37 | 37 | ]); |
38 | 38 | } |
39 | 39 | } |
40 | 40 | |
41 | -if(! function_exists('first_user_as_task_manager')){ |
|
41 | +if ( ! function_exists('first_user_as_task_manager')) { |
|
42 | 42 | |
43 | - function first_user_as_task_manager(){ |
|
43 | + function first_user_as_task_manager() { |
|
44 | 44 | User::all()->first()->assignRole('task-manager'); |
45 | 45 | } |
46 | 46 |