Completed
Push — develop ( 19edec...52d88a )
by Francisco
03:57
created
app/Http/Controllers/Admin/CourseController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public function show($id)
18 18
     {
19
-        $data = DB::transaction(function () use ($id) {
19
+        $data = DB::transaction(function() use ($id) {
20 20
             $data = [];
21 21
             $data['course'] = Course::findOrFail($id);
22 22
             $data['enrollments'] = $data['course']->enrollments()
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/EnrollmentController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     public function export()
24 24
     {
25 25
         // Get the list of students enrolled on each course
26
-        $enrollments = DB::transaction(function () {
26
+        $enrollments = DB::transaction(function() {
27 27
             $enrollments = Enrollment::with(['student', 'course'])
28 28
                                      ->get()
29 29
                                      ->sortByDesc('courses.name');
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
         });
33 33
 
34 34
         // Export to CSV
35
-        $result = Excel::create('enrollments', function ($excel) use ($enrollments) {
36
-            $excel->sheet('Enrollments', function ($sheet) use ($enrollments) {
35
+        $result = Excel::create('enrollments', function($excel) use ($enrollments) {
36
+            $excel->sheet('Enrollments', function($sheet) use ($enrollments) {
37 37
                 $sheet->loadView('enrollments.export', compact('enrollments'));
38 38
             });
39 39
         });
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
             $path = $file->path();
55 55
             $filename = $file->getClientOriginalName();
56 56
 
57
-            Excel::load($path, function ($reader) use ($filename) {
58
-                DB::transaction(function () use ($filename, $reader) {
57
+            Excel::load($path, function($reader) use ($filename) {
58
+                DB::transaction(function() use ($filename, $reader) {
59 59
                     // Loop for all the rows of the table
60 60
                     $index = 1;
61
-                    $reader->each(function ($row) use (&$index) {
61
+                    $reader->each(function($row) use (&$index) {
62 62
                         // Calculate the row index
63 63
                         $index++;
64 64
 
Please login to merge, or discard this patch.