$this->auth() ]; $fields = ['*']; $sort = '`id` desc'; $page = request('page', 1); $limit = request('limit', 20); return DiarySleepFacade::getList($conditions, $fields, $sort, $page, $limit); } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { $data = $request->all(); $data['uid'] = $this->auth(); $data['day'] = Carbon::today()->toDateString(); $data['repeat'] = 'day:'.$data['day'].' uid:'.$data['uid']; return DiarySleepFacade::create($data); } /** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { // } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { // } /** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // } }