public static function getContentPage($page, &$data) { $data['contentPage'] = self::where('menu_url', $page)->first()->toJson(); if (\Request::input('angular')) { echo $data['contentPage']; die; } }
public static function getCategories(&$data) { $data['contentPage'] = self::all()->toJson(); if (\Request::input('angular')) { echo $data['contentPage']; die; } }
public static function findRequested() { $query = Profile::query(); \Request::input("id") and $query->where("id", \Request::input("id")); \Request::input("name") and $query->where("name", "like", "%" . \Request::input("name") . "%"); \Request::input("dob") and $query->where("dob", \Request::input("dob")); \Request::input("gender") and $query->where("gender", \Request::input("gender")); \Request::input("is_a_good_person") and $query->where("is_a_good_person", \Request::input("is_a_good_person")); \Request::input("sort") and $query->orderBy(\Request::input("sort"), \Request::input("sortType", "asc")); return $query->paginate(15); }
public static function getProducts($categorie, &$data) { if (is_numeric($categorie) && \Request::input('angular')) { echo Categorie::find($categorie)->products->toJson(); die; } if ($categorie = Categorie::where('href', '=', $categorie)->first()) { $categorie = $categorie->toArray(); if ($products = Categorie::find($categorie['id'])->products) { $data['contentPage'] = $products->toJson(); } } }
public static function findRequested() { $query = Phone::query(); // search results based on user input \Request::input('id') and $query->where('id', \Request::input('id')); \Request::input('model') and $query->where('model', 'like', '%' . \Request::input('model') . '%'); \Request::input('manufacturer') and $query->where('manufacturer', 'like', '%' . \Request::input('manufacturer') . '%'); \Request::input('operating_system') and $query->where('operating_system', \Request::input('operating_system')); \Request::input('created_at') and $query->where('created_at', \Request::input('created_at')); \Request::input('updated_at') and $query->where('updated_at', \Request::input('updated_at')); \Request::input('release_date') and $query->where('release_date', \Request::input('release_date')); // sort results \Request::input("sort") and $query->orderBy(\Request::input("sort"), \Request::input("sortType", "asc")); // paginate results return $query->paginate(15); }
public static function findRequested() { $query = Person::query(); // search results based on user input \Request::input('id') and $query->where('id', \Request::input('id')); \Request::input('name') and $query->where('name', 'like', '%' . \Request::input('name') . '%'); \Request::input('dob') and $query->where('dob', \Request::input('dob')); \Request::input('about') and $query->where('about', 'like', '%' . \Request::input('about') . '%'); \Request::input('is_a_good_person') and $query->where('is_a_good_person', \Request::input('is_a_good_person')); \Request::input('gender') and $query->where('gender', \Request::input('gender')); \Request::input('image') and $query->where('image', 'like', '%' . \Request::input('image') . '%'); \Request::input('created_at') and $query->where('created_at', \Request::input('created_at')); \Request::input('updated_at') and $query->where('updated_at', \Request::input('updated_at')); // sort results \Request::input("sort") and $query->orderBy(\Request::input("sort"), \Request::input("sortType", "asc")); // paginate results return $query->paginate(15); }
public function getKodeBarang(Request $request) { $id = $request->input('idBarang'); $barang = Barang::where('idBarang', '=', $id)->get(); return $barang; }