@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $roles = $this->getRoleNames()->toArray(); |
68 | 68 | |
69 | 69 | if (\count($roles)) { |
70 | - return implode(', ', array_map(function ($item) { |
|
70 | + return implode(', ', array_map(function($item) { |
|
71 | 71 | return ucwords($item); |
72 | 72 | }, $roles)); |
73 | 73 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $permissions = $this->getDirectPermissions()->toArray(); |
84 | 84 | |
85 | 85 | if (\count($permissions)) { |
86 | - return implode(', ', array_map(function ($item) { |
|
86 | + return implode(', ', array_map(function($item) { |
|
87 | 87 | return ucwords($item['name']); |
88 | 88 | }, $permissions)); |
89 | 89 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | /* |
143 | 143 | * If the admin is currently NOT spoofing a user |
144 | 144 | */ |
145 | - if (! session()->has('admin_user_id') || ! session()->has('temp_user_id')) { |
|
145 | + if (!session()->has('admin_user_id') || !session()->has('temp_user_id')) { |
|
146 | 146 | //Won't break, but don't let them "Login As" themselves |
147 | 147 | if ($this->id != auth()->id()) { |
148 | 148 | return '<a href="'.route( |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | */ |
228 | 228 | public function getConfirmedButtonAttribute() |
229 | 229 | { |
230 | - if (! $this->isConfirmed() && ! config('access.users.requires_approval')) { |
|
230 | + if (!$this->isConfirmed() && !config('access.users.requires_approval')) { |
|
231 | 231 | return '<a href="'.route('admin.auth.user.account.confirm.resend', $this).'" class="dropdown-item">'.__('buttons.backend.access.users.resend_email').'</a> '; |
232 | 232 | } |
233 | 233 |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | public function canChangePassword() |
22 | 22 | { |
23 | - return ! app('session')->has(config('access.socialite_session_name')); |
|
23 | + return !app('session')->has(config('access.socialite_session_name')); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | { |
34 | 34 | switch ($this->avatar_type) { |
35 | 35 | case 'gravatar': |
36 | - if (! $size) { |
|
36 | + if (!$size) { |
|
37 | 37 | $size = config('gravatar.default.size'); |
38 | 38 | } |
39 | 39 | |
@@ -96,6 +96,6 @@ discard block |
||
96 | 96 | */ |
97 | 97 | public function isPending() |
98 | 98 | { |
99 | - return config('access.users.requires_approval') && ! $this->confirmed; |
|
99 | + return config('access.users.requires_approval') && !$this->confirmed; |
|
100 | 100 | } |
101 | 101 | } |
@@ -121,19 +121,19 @@ discard block |
||
121 | 121 | { |
122 | 122 | parent::boot(); |
123 | 123 | |
124 | - static::saving(function (self $model) { |
|
124 | + static::saving(function(self $model) { |
|
125 | 125 | $model->slug = str_slug($model->name); |
126 | 126 | }); |
127 | 127 | } |
128 | 128 | |
129 | 129 | public function getCanEditAttribute() |
130 | 130 | { |
131 | - return ! $this->is_super_admin || 1 === auth()->id(); |
|
131 | + return !$this->is_super_admin || 1 === auth()->id(); |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | public function getCanDeleteAttribute() |
135 | 135 | { |
136 | - return ! $this->is_super_admin && $this->id !== auth()->id() && ( |
|
136 | + return !$this->is_super_admin && $this->id !== auth()->id() && ( |
|
137 | 137 | Gate::check('delete users') |
138 | 138 | ); |
139 | 139 | } |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | public function getCanImpersonateAttribute() |
142 | 142 | { |
143 | 143 | if (Gate::check('impersonate users')) { |
144 | - return ! $this->is_super_admin |
|
144 | + return !$this->is_super_admin |
|
145 | 145 | && session()->get('admin_user_id') !== $this->id |
146 | 146 | && $this->id !== auth()->id(); |
147 | 147 | } |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | |
196 | 196 | foreach ($this->roles as $role) { |
197 | 197 | foreach ($role->permissions as $permission) { |
198 | - if (! \in_array($permission, $permissions, true)) { |
|
198 | + if (!\in_array($permission, $permissions, true)) { |
|
199 | 199 | $permissions[] = $permission; |
200 | 200 | } |
201 | 201 | } |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | */ |
229 | 229 | public function getProvider($provider) |
230 | 230 | { |
231 | - return $this->providers->first(function (SocialLogin $item) use ($provider) { |
|
231 | + return $this->providers->first(function(SocialLogin $item) use ($provider) { |
|
232 | 232 | return $item->provider === $provider; |
233 | 233 | }); |
234 | 234 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | { |
177 | 177 | parent::boot(); |
178 | 178 | |
179 | - static::deleted(function (self $post) { |
|
179 | + static::deleted(function(self $post) { |
|
180 | 180 | $post->meta->delete(); |
181 | 181 | }); |
182 | 182 | } |
@@ -241,12 +241,12 @@ discard block |
||
241 | 241 | |
242 | 242 | public function getMetaTitleAttribute() |
243 | 243 | { |
244 | - return null !== $this->meta && ! empty($this->meta->title) ? $this->meta->title : $this->title; |
|
244 | + return null !== $this->meta && !empty($this->meta->title) ? $this->meta->title : $this->title; |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | public function getMetaDescriptionAttribute() |
248 | 248 | { |
249 | - return null !== $this->meta && ! empty($this->meta->description) ? $this->meta->description : $this->summary; |
|
249 | + return null !== $this->meta && !empty($this->meta->description) ? $this->meta->description : $this->summary; |
|
250 | 250 | } |
251 | 251 | |
252 | 252 | public function owner() |
@@ -14,9 +14,9 @@ |
||
14 | 14 | |
15 | 15 | public static function bootHasTranslatableSlug() |
16 | 16 | { |
17 | - static::saving(function (Model $model) { |
|
17 | + static::saving(function(Model $model) { |
|
18 | 18 | collect($model->getTranslatedLocales($model->sluggable)) |
19 | - ->each(function (string $locale) use ($model) { |
|
19 | + ->each(function(string $locale) use ($model) { |
|
20 | 20 | $model->setTranslation('slug', $locale, |
21 | 21 | $model->generateSlug($model->getTranslation($model->sluggable, $locale), $locale) |
22 | 22 | ); |
@@ -32,7 +32,7 @@ |
||
32 | 32 | { |
33 | 33 | parent::boot(); |
34 | 34 | |
35 | - static::creating(function ($model) { |
|
35 | + static::creating(function($model) { |
|
36 | 36 | $model->{$model->getUuidName()} = PackageUuid::generate(4)->string; |
37 | 37 | }); |
38 | 38 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | { |
11 | 11 | public static function bootHasEditor() |
12 | 12 | { |
13 | - static::saved(function (Model $model) { |
|
13 | + static::saved(function(Model $model) { |
|
14 | 14 | if ($model instanceof HasMedia && property_exists($model, 'editorFields')) { |
15 | 15 | foreach ($model->editorFields as $field) { |
16 | 16 | $model->saveImagesToMediaCollection($field); |
@@ -7,13 +7,13 @@ |
||
7 | 7 | class Campaign extends Model |
8 | 8 | { |
9 | 9 | |
10 | - public function campaign_configurations(){ |
|
10 | + public function campaign_configurations() { |
|
11 | 11 | return $this->hasMany('App\Campaign_configuration'); |
12 | 12 | } |
13 | - public function campaign_lang_informations(){ |
|
13 | + public function campaign_lang_informations() { |
|
14 | 14 | return $this->hasMany('App\Campaign_lang_information'); |
15 | 15 | } |
16 | - public function payments(){ |
|
16 | + public function payments() { |
|
17 | 17 | return $this->hasMany('App\Payment'); |
18 | 18 | } |
19 | 19 |
@@ -8,17 +8,17 @@ |
||
8 | 8 | use App\Model\Payment; |
9 | 9 | |
10 | 10 | class PaymentImplementation extends Model { |
11 | - static public function createPayment($request, $id) { |
|
11 | + static public function createPayment($request, $id) { |
|
12 | 12 | |
13 | 13 | $message = file_get_contents('php://input'); |
14 | 14 | $message = json_decode($message); |
15 | 15 | |
16 | 16 | if($message->transaction->status == "successful") { |
17 | - $payment = new Payment; |
|
18 | - $payment->campaign_id = $id; |
|
19 | - $payment->amount = $message->transaction->amount * 0.01; |
|
20 | - $payment->token_payment = $message->transaction->credit_card->token; |
|
21 | - $payment->save(); |
|
17 | + $payment = new Payment; |
|
18 | + $payment->campaign_id = $id; |
|
19 | + $payment->amount = $message->transaction->amount * 0.01; |
|
20 | + $payment->token_payment = $message->transaction->credit_card->token; |
|
21 | + $payment->save(); |
|
22 | + } |
|
22 | 23 | } |
23 | - } |
|
24 | 24 | } |
25 | 25 | \ No newline at end of file |
@@ -13,7 +13,7 @@ |
||
13 | 13 | $message = file_get_contents('php://input'); |
14 | 14 | $message = json_decode($message); |
15 | 15 | |
16 | - if($message->transaction->status == "successful") { |
|
16 | + if ($message->transaction->status == "successful") { |
|
17 | 17 | $payment = new Payment; |
18 | 18 | $payment->campaign_id = $id; |
19 | 19 | $payment->amount = $message->transaction->amount * 0.01; |