@@ -17,7 +17,7 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | public function index(Request $request) |
| 19 | 19 | { |
| 20 | - return Event::for($request->only([ |
|
| 20 | + return Event::for ($request->only([ |
|
| 21 | 21 | 'events.id', 'event_id', 'event_type', 'event_types_name', 'events.is_active', 'events.name', 'events.description', 'events.date', |
| 22 | 22 | ]))->join('event_types', 'event_types.id', '=', 'events.event_type_id') |
| 23 | 23 | ->select('events.id', 'events.name', 'events.description', 'events.date', 'events.event_id', 'events.is_active', 'events.event_id', 'events.event_type', \DB::raw('event_types.name AS event_types_name')) |
@@ -19,10 +19,12 @@ |
||
| 19 | 19 | { |
| 20 | 20 | return Event::for($request->only([ |
| 21 | 21 | 'events.id', 'event_id', 'event_type', 'event_types_name', 'events.is_active', 'events.name', 'events.description', 'events.date', |
| 22 | - ]))->join('event_types', 'event_types.id', '=', 'events.event_type_id') |
|
| 22 | + ])) { |
|
| 23 | + ->join('event_types', 'event_types.id', '=', 'events.event_type_id') |
|
| 23 | 24 | ->select('events.id', 'events.name', 'events.description', 'events.date', 'events.event_id', 'events.is_active', 'events.event_id', 'events.event_type', \DB::raw('event_types.name AS event_types_name')) |
| 24 | 25 | ->orderBy('events.created_at', 'desc') |
| 25 | 26 | ->get('events.id', 'events.events_id', 'events.events_type', 'events.name', 'events.description', 'event_types_name', 'events.is_active'); |
| 27 | + } |
|
| 26 | 28 | } |
| 27 | 29 | |
| 28 | 30 | public function create(EventForm $form) |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | { |
| 18 | 18 | $this->registerPolicies(); |
| 19 | 19 | |
| 20 | - Horizon::auth(function ($request) { |
|
| 20 | + Horizon::auth(function($request) { |
|
| 21 | 21 | return auth()->check() && $request->user()->isAdmin(); |
| 22 | 22 | }); |
| 23 | 23 | } |
@@ -9,9 +9,9 @@ |
||
| 9 | 9 | { |
| 10 | 10 | public function run() |
| 11 | 11 | { |
| 12 | - \DB::transaction(function () { |
|
| 12 | + \DB::transaction(function() { |
|
| 13 | 13 | $this->rowsFromSheet('owners') |
| 14 | - ->each(function ($row) { |
|
| 14 | + ->each(function($row) { |
|
| 15 | 15 | $this->importRow($row); |
| 16 | 16 | }); |
| 17 | 17 | }); |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | |
| 12 | 12 | public function query() |
| 13 | 13 | { |
| 14 | - return Individual::leftJoin('events', function ($join) { |
|
| 14 | + return Individual::leftJoin('events', function($join) { |
|
| 15 | 15 | $join->on('individuals.id', '=', 'events.id') |
| 16 | 16 | ->where('events.event_type', '=', 'App\Individual') |
| 17 | 17 | ->where('events.event_type_id', '=', 1); |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | { |
| 16 | 16 | parent::boot(); |
| 17 | 17 | |
| 18 | - static::creating(function ($model) { |
|
| 18 | + static::creating(function($model) { |
|
| 19 | 19 | $model->uuid = (string) Uuid::uuid4(); |
| 20 | 20 | }); |
| 21 | 21 | } |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | { |
| 16 | 16 | parent::boot(); |
| 17 | 17 | |
| 18 | - static::creating(function ($model) { |
|
| 18 | + static::creating(function($model) { |
|
| 19 | 19 | $model->uuid = (string) Uuid::uuid4(); |
| 20 | 20 | }); |
| 21 | 21 | } |