コード例 #1
0
ファイル: Test.php プロジェクト: gitfreengers/larus
 public function total()
 {
     $test = Test::all()->count();
     return $test;
 }
コード例 #2
0
ファイル: TestController.php プロジェクト: gitfreengers/larus
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     //
     $test = Test::find($id);
     $test->delete();
     $affectedRows = 1;
     return $affectedRows;
 }