コード例 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $time = date('Y-m');
     $data['lists'] = Month::where('m_when', 'like', '%' . $time . '%')->where('m_result', null)->get();
     $data['finish'] = Month::where('m_when', 'like', '%' . $time . '%')->where('m_result', '<>', 'null')->get();
     return response()->json($data);
 }