/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { $seasons = Season::all(); $categories = Category::get()->toTree(); $materials = Material::all(); return view('back.products.create', compact('seasons', 'categories', 'materials')); }
public function getRegistrar() { $materiales = Material::all(); $unidades = UnidadEntrega::all(); $familias = Familia::all(); $marcas = Marca::all(); return view('material.materiales', ['materiales' => $materiales, 'unidades' => $unidades, 'familias' => $familias, 'marcas' => $marcas]); }
public function index() { $materials = Material::all(); //$response = json_decode($materials); return response()->json($materials); }
public function index() { $materials = Material::all(); return view('material.index', compact('materials')); }