Completed
Push — master ( 9dd409...b5065b )
by Arjay
01:22
created

DataTablesExportHandler::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Yajra\DataTables\Services;
4
5
use Illuminate\Support\Collection;
6
use Maatwebsite\Excel\Concerns\Exportable;
7
use Maatwebsite\Excel\Concerns\FromCollection;
8
9
class DataTablesExportHandler implements FromCollection
10
{
11
    use Exportable;
12
13
    /**
14
     * @var Collection
15
     */
16
    protected $collection;
17
18
    /**
19
     * DataTablesExportHandler constructor.
20
     *
21
     * @param Collection $collection
22
     */
23
    public function __construct(Collection $collection)
24
    {
25
        $this->collection = $collection;
26
    }
27
28
    /**
29
     * @return Collection
30
     */
31
    public function collection()
32
    {
33
        return $this->collection;
34
    }
35
}
36