@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | $father = Person::findOrFail($father_id); |
40 | 40 | $mother = Person::findOrFail($mother_id); |
41 | 41 | |
42 | - foreach($individualsList as $individual) |
|
42 | + foreach ($individualsList as $individual) |
|
43 | 43 | { |
44 | - $id = Individual::select('id','name')->where('name', '=', $individual->name); |
|
44 | + $id = Individual::select('id', 'name')->where('name', '=', $individual->name); |
|
45 | 45 | $person = Person::find($id); |
46 | 46 | $person->father()->attach($father); |
47 | 47 | $person->mother()->attach($mother); |
@@ -88,10 +88,10 @@ discard block |
||
88 | 88 | $father = Person::findOrFail($father_id); |
89 | 89 | $mother = Person::findOrFail($mother_id); |
90 | 90 | |
91 | - foreach($individualsList as $individual) |
|
91 | + foreach ($individualsList as $individual) |
|
92 | 92 | { |
93 | 93 | |
94 | - $id = Individual::select('id','name')->where('name', '=', $individual->name); |
|
94 | + $id = Individual::select('id', 'name')->where('name', '=', $individual->name); |
|
95 | 95 | $person = Person::find($id); |
96 | 96 | $person = Person::find($individual->id); |
97 | 97 | $person->father()->attach($father); |
@@ -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 | }); |