Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 5 |
| LogController | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
20.00 | |
0.00% |
0 / 5 |
| index | |
0.00% |
0 / 1 |
6.00 | |
0.00% |
0 / 3 |
|||
| show | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 1 |
|||
| destroy | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 1 |
|||
| <?php | |
| namespace App\Http\Controllers; | |
| use App\Log; | |
| use Exception; | |
| use Illuminate\Http\Request; | |
| use Illuminate\Http\Response; | |
| use Illuminate\Support\Facades\Auth; | |
| use Illuminate\Support\Facades\Gate; | |
| use Illuminate\Support\Facades\Validator; | |
| class LogController extends Controller | |
| { | |
| /** | |
| * Display a listing of the resource. | |
| * | |
| * @return Response | |
| */ | |
| public function index() | |
| { | |
| if(!Gate::allows('日志-查询')){ return redirect(url('/')); } | |
| $logs=Log::orderBy('id','desc')->paginate(55); | |
| return view('maintenance.log.index',['logs'=>$logs]); | |
| } | |
| /** | |
| * Display the specified resource. | |
| * | |
| * @param Log $log | |
| * @return Response | |
| */ | |
| public function show(Log $log) | |
| { | |
| return view('maintenance.log.show',['log'=>$log]); | |
| } | |
| /** | |
| * Remove the specified resource from storage. | |
| * | |
| * @param Log $log | |
| * @return array|Response | |
| * @throws Exception | |
| */ | |
| public function destroy(Log $log) | |
| { | |
| // if(!Gate::allows('物流公司-删除')){ return redirect(url('/')); } | |
| // $this->log(__METHOD__,__FUNCTION__,$log->toJson(),Auth::user()['id']); | |
| // $re=$log->delete(); | |
| // return ['success'=>$re]; | |
| } | |
| } |