Example #1
0
 protected function allcatalogues()
 {
     $cat = [];
     $materials = Catalogue::select('material_type_id')->groupBy('material_type_id')->get();
     foreach ($materials as $material) {
         $cat[$material->material_type_id] = Material::where('material_type_id', $material->material_type_id)->valid()->get();
     }
     return $cat;
 }
Example #2
0
 public function appmenu()
 {
     $catalogues = Catalogue::orderBy('ranking', 'asc')->get();
     return response()->json(['catalogues' => $catalogues]);
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     Catalogue::destroy($id);
     return redirect()->route('admin.menu.catalogue.index')->withFlashSuccess(trans("menu_backend.menu_catalogue_deleting"));
 }