Cosmetics
This commit is contained in:
+2
-2
@@ -25,7 +25,7 @@ use Laratrust\Traits\LaratrustUserTrait;
|
|||||||
* @property \Carbon\Carbon updated_at
|
* @property \Carbon\Carbon updated_at
|
||||||
* @property Rank rank
|
* @property Rank rank
|
||||||
* @property Journal journal
|
* @property Journal journal
|
||||||
* @property string pilot_id
|
* @property int rank_id
|
||||||
* @property int state
|
* @property int state
|
||||||
* @property bool opt_in
|
* @property bool opt_in
|
||||||
* @mixin \Illuminate\Notifications\Notifiable
|
* @mixin \Illuminate\Notifications\Notifiable
|
||||||
@@ -137,7 +137,7 @@ class User extends Authenticatable
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new File([
|
return new File([
|
||||||
'path' => $this->attributes['avatar']
|
'path' => $this->attributes['avatar']
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,10 +12,13 @@ use App\Cron\Nightly\PilotLeave;
|
|||||||
use App\Cron\Nightly\RecalculateBalances;
|
use App\Cron\Nightly\RecalculateBalances;
|
||||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* All of the hooks for the cron jobs
|
||||||
|
* @package App\Providers
|
||||||
|
*/
|
||||||
class CronServiceProvider extends ServiceProvider
|
class CronServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
protected $listen = [
|
protected $listen = [
|
||||||
# Cron hooks
|
|
||||||
CronNightly::class => [
|
CronNightly::class => [
|
||||||
ApplyExpenses::class,
|
ApplyExpenses::class,
|
||||||
RecalculateBalances::class,
|
RecalculateBalances::class,
|
||||||
@@ -31,6 +34,4 @@ class CronServiceProvider extends ServiceProvider
|
|||||||
\App\Cron\Monthly\ApplyExpenses::class
|
\App\Cron\Monthly\ApplyExpenses::class
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $subscribe = [];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -199,9 +199,9 @@ class UserService extends Service
|
|||||||
foreach ($ranks as $rank) {
|
foreach ($ranks as $rank) {
|
||||||
if ($rank->hours > $pilot_hours->hours) {
|
if ($rank->hours > $pilot_hours->hours) {
|
||||||
break;
|
break;
|
||||||
} else {
|
|
||||||
$user->rank_id = $rank->id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$user->rank_id = $rank->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only trigger the event/update if there's been a change
|
// Only trigger the event/update if there's been a change
|
||||||
|
|||||||
Reference in New Issue
Block a user