Completed
Pull Request — master (#659)
by Andrey
01:34
created

Controller::json()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Mpociot\ApiDoc\Http;
4
5
use Illuminate\Support\Facades\Storage;
6
7
class Controller
8
{
9
    public function blade()
10
    {
11
        return view('apidoc.index');
12
    }
13
14
    /**
15
     * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
16
     *
17
     * @return \Illuminate\Http\JsonResponse
18
     */
19
    public function json()
20
    {
21
        return response()->json(
22
            Storage::disk('local')->get('apidoc/collection.json')
23
        );
24
    }
25
}
26