Created
August 1, 2016 19:06
-
-
Save chanakaDe/fee74b87330b0f7f59dbae1e2c99868e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use DB; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Http\Request; | |
class BoxsetController extends Controller | |
{ | |
public function index($offset) | |
{ | |
$Sesries = DB::table('tblseries')->select('seriesid', 'seriesname', 'imagepath', 'views', 'scenes')->where('active', '=', 'y')->whereIn('site', [1, 3])->skip($offset)->take(6)->get(); | |
return response()->json($Sesries); | |
} | |
public function getByMostRecent($offset) | |
{ | |
$Sesries = DB::table('tblseries')->select('seriesid', 'seriesname', 'imagepath', 'views', 'scenes')->where('active', '=', 'y')->whereIn('site', [1, 3])->orderBy('lastupdated', 'desc')->skip($offset)->take(6)->get(); | |
return response()->json($Sesries); | |
} | |
public function getByPopularity($offset) | |
{ | |
$Sesries = DB::table('tblseries')->select('seriesid', 'seriesname', 'imagepath', 'views', 'scenes')->where('active', '=', 'y')->whereIn('site', [1, 3])->orderBy('views', 'desc')->skip($offset)->take(6)->get(); | |
return response()->json($Sesries); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment