@@ -3,12 +3,12 @@ |
||
3 | 3 | use FaithGen\SDK\Http\Controllers\MinistryController; |
4 | 4 | use Illuminate\Support\Facades\Route; |
5 | 5 | |
6 | -Route::name('ministry.')->prefix('ministry/')->group(function () { |
|
7 | - Route::get('users', [MinistryController::class, 'users']); |
|
8 | - Route::put('social-link', [MinistryController::class, 'saveSocialLink']); |
|
9 | - Route::post('profile', [MinistryController::class, 'updateProfile']); |
|
10 | - Route::post('photo', [MinistryController::class, 'updatePhoto']); |
|
11 | - Route::post('password', [MinistryController::class, 'updatePassword']); |
|
12 | - Route::post('users/toggle-activity', [MinistryController::class, 'toggleActivity']); |
|
13 | - Route::delete('/', [MinistryController::class, 'deleteProfile']); |
|
6 | +Route::name('ministry.')->prefix('ministry/')->group(function() { |
|
7 | + Route::get('users', [ MinistryController::class, 'users' ]); |
|
8 | + Route::put('social-link', [ MinistryController::class, 'saveSocialLink' ]); |
|
9 | + Route::post('profile', [ MinistryController::class, 'updateProfile' ]); |
|
10 | + Route::post('photo', [ MinistryController::class, 'updatePhoto' ]); |
|
11 | + Route::post('password', [ MinistryController::class, 'updatePassword' ]); |
|
12 | + Route::post('users/toggle-activity', [ MinistryController::class, 'toggleActivity' ]); |
|
13 | + Route::delete('/', [ MinistryController::class, 'deleteProfile' ]); |
|
14 | 14 | }); |
@@ -3,11 +3,11 @@ |
||
3 | 3 | use FaithGen\SDK\Http\Controllers\AuthController; |
4 | 4 | use Illuminate\Support\Facades\Route; |
5 | 5 | |
6 | -Route::prefix('auth/')->name('auth.')->group(function () { |
|
7 | - Route::post('register', [AuthController::class, 'register'])->name('register'); |
|
8 | - Route::post('login', [AuthController::class, 'login'])->name('login'); |
|
9 | - Route::post('forgot-password', [AuthController::class, 'forgotPassword'])->name('forgotPassword'); |
|
10 | - Route::get('resend-activation', [AuthController::class, 'resendActivation'])->name('resendActivation')->middleware('auth:api'); |
|
11 | - Route::delete('delete-account', [AuthController::class, 'deleteAccount'])->name('deleteAccount')->middleware('auth:api'); |
|
12 | - Route::get('logout', [AuthController::class, 'logout'])->name('logout')->middleware('auth:api'); |
|
6 | +Route::prefix('auth/')->name('auth.')->group(function() { |
|
7 | + Route::post('register', [ AuthController::class, 'register' ])->name('register'); |
|
8 | + Route::post('login', [ AuthController::class, 'login' ])->name('login'); |
|
9 | + Route::post('forgot-password', [ AuthController::class, 'forgotPassword' ])->name('forgotPassword'); |
|
10 | + Route::get('resend-activation', [ AuthController::class, 'resendActivation' ])->name('resendActivation')->middleware('auth:api'); |
|
11 | + Route::delete('delete-account', [ AuthController::class, 'deleteAccount' ])->name('deleteAccount')->middleware('auth:api'); |
|
12 | + Route::get('logout', [ AuthController::class, 'logout' ])->name('logout')->middleware('auth:api'); |
|
13 | 13 | }); |
@@ -24,10 +24,10 @@ discard block |
||
24 | 24 | return static::getDefaultImage(); |
25 | 25 | } |
26 | 26 | |
27 | - return (object) [ |
|
28 | - '_50' => $server.'/storage/'.$folder.'/50-50/'.$imageName, |
|
29 | - '_100' => $server.'/storage/'.$folder.'/100-100/'.$imageName, |
|
30 | - 'original' => $server.'/storage/'.$folder.'/original/'.$imageName, |
|
27 | + return (object)[ |
|
28 | + '_50' => $server . '/storage/' . $folder . '/50-50/' . $imageName, |
|
29 | + '_100' => $server . '/storage/' . $folder . '/100-100/' . $imageName, |
|
30 | + 'original' => $server . '/storage/' . $folder . '/original/' . $imageName, |
|
31 | 31 | ]; |
32 | 32 | } |
33 | 33 | |
@@ -44,10 +44,10 @@ discard block |
||
44 | 44 | $protocol = 'https://'; |
45 | 45 | } |
46 | 46 | |
47 | - return (object) [ |
|
48 | - '_50' => $protocol.$_SERVER['HTTP_HOST'].'/images/logo-50.png', |
|
49 | - '_100' => $protocol.$_SERVER['HTTP_HOST'].'/images/logo-100.png', |
|
50 | - 'original' => $protocol.$_SERVER['HTTP_HOST'].'/images/logo-original.png', |
|
47 | + return (object)[ |
|
48 | + '_50' => $protocol . $_SERVER[ 'HTTP_HOST' ] . '/images/logo-50.png', |
|
49 | + '_100' => $protocol . $_SERVER[ 'HTTP_HOST' ] . '/images/logo-100.png', |
|
50 | + 'original' => $protocol . $_SERVER[ 'HTTP_HOST' ] . '/images/logo-original.png', |
|
51 | 51 | ]; |
52 | 52 | } |
53 | 53 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public static function getImage(string $folder, ?Image $image, ?string $server = null) |
63 | 63 | { |
64 | - if (! $server) { |
|
64 | + if (!$server) { |
|
65 | 65 | $server = config('faithgen-sdk.ministries-server'); |
66 | 66 | } |
67 | 67 |
@@ -9,6 +9,6 @@ |
||
9 | 9 | { |
10 | 10 | public function creating(Activation $activation) |
11 | 11 | { |
12 | - $activation->code = (string) Str::uuid(); |
|
12 | + $activation->code = (string)Str::uuid(); |
|
13 | 13 | } |
14 | 14 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | public function creating(Ministry $ministry) |
16 | 16 | { |
17 | 17 | $ministry->password = Hash::make(request()->password); |
18 | - $ministry->id = (string) Str::uuid(); |
|
18 | + $ministry->id = (string)Str::uuid(); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | /** |
@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | public function creating(User $user) |
24 | 24 | { |
25 | - $user->id = (string) Str::uuid(); |
|
25 | + $user->id = (string)Str::uuid(); |
|
26 | 26 | $user->password = Hash::make(env('DEFAULT_PASSWORD', 'secret')); |
27 | 27 | } |
28 | 28 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | { |
18 | 18 | $results = parent::toArray($request); |
19 | 19 | $results = array_merge($results, [ |
20 | - 'active' => (bool) $this->activation->active, |
|
20 | + 'active' => (bool)$this->activation->active, |
|
21 | 21 | 'avatar' => ImageHelper::getImage('profile', $this->image), |
22 | 22 | ]); |
23 | 23 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | { |
13 | 13 | return [ |
14 | 14 | 'id' => $this->user_id, |
15 | - 'active' => (bool) $this->active, |
|
15 | + 'active' => (bool)$this->active, |
|
16 | 16 | 'name' => $this->user->name, |
17 | 17 | 'email' => $this->user->email, |
18 | 18 | 'phone' => $this->user->phone, |
@@ -22,7 +22,7 @@ |
||
22 | 22 | 'email' => $this->email, |
23 | 23 | 'phone' => $this->phone, |
24 | 24 | 'color' => $this->profile->color, |
25 | - 'active' => (bool) $this->activation->active, |
|
25 | + 'active' => (bool)$this->activation->active, |
|
26 | 26 | 'api_key' => $this->apiKey->api_key, |
27 | 27 | 'avatar' => ImageHelper::getImage('profile', $this->image, config('faithgen-sdk.ministries-server')), |
28 | 28 | 'date' => Helper::getDates($this->created_at), |