Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 8 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
Controller | |
0.00% |
0 / 8 |
|
0.00% |
0 / 2 |
12 | |
0.00% |
0 / 1 |
summernote_upload_image | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
testPopUp | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace App\Http\Controllers; |
4 | |
5 | use App\Traits\response; |
6 | use App\Traits\Upload; |
7 | use Exception; |
8 | use Intervention\Image\ImageManagerStatic as Image; |
9 | use Illuminate\Foundation\Auth\Access\AuthorizesRequests; |
10 | use Illuminate\Foundation\Bus\DispatchesJobs; |
11 | use Illuminate\Foundation\Validation\ValidatesRequests; |
12 | use Illuminate\Routing\Controller as BaseController; |
13 | use Illuminate\Http\Request; |
14 | |
15 | class Controller extends BaseController |
16 | { |
17 | use AuthorizesRequests, DispatchesJobs, ValidatesRequests; |
18 | use Upload; |
19 | use response; |
20 | |
21 | public function summernote_upload_image(Request $request){ |
22 | $path = null; |
23 | if($request->has('file')){ |
24 | $path = $this->uploadImage($request->file('file'), 'uploads/images'); |
25 | } |
26 | |
27 | return url('uploads/images/' . $path); |
28 | } |
29 | |
30 | public function testPopUp(){ |
31 | return [ |
32 | 'title' => 'title', |
33 | 'body' => 'test', |
34 | ]; |
35 | } |
36 | } |