%PDF- %PDF-
Direktori : /home/ugotscom/3vfm3/app/Http/Controllers/ |
Current File : /home/ugotscom/3vfm3/app/Http/Controllers/PackageController.php |
<?php namespace App\Http\Controllers; use App\Package; use App\PackageDetail; use Illuminate\Http\Request; class PackageController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $data=Package::orderBy('package_id', 'DESC')->where('status',1)->paginate(20); return response()->json($data); } /** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { // } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { // } /** * Display the specified resource. * * @param \App\Package $package * @return \Illuminate\Http\Response */ public function show(Package $package) { // } /** * Show the form for editing the specified resource. * * @param \App\Package $package * @return \Illuminate\Http\Response */ public function edit(Package $package) { // } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Package $package * @return \Illuminate\Http\Response */ public function update(Request $request, Package $package) { // } /** * Remove the specified resource from storage. * * @param \App\Package $package * @return \Illuminate\Http\Response */ public function destroy(Package $package) { // } public function packagedetail($id){ $data=PackageDetail::where('package_id',$id)->get(); return response()->json($data); } public function featuredpackage($id){ $data=Package::where('package_id',$id)->get(); return response()->json($data); } public function destinationpackage($id){ $data=Package::where('destination',$id)->get(); return response()->json($data); } public function internationalpackage(){ $data=Package::where('destination','<',2)->orWhere('destination','>',2)->paginate(10); return response()->json($data); } }