Esempio n. 1
0
 public function search($q)
 {
     $materials = Material::where('nombre', 'like', $q . '%')->paginate(15);
     return $materials;
 }
Esempio n. 2
0
 public function materials_select()
 {
     $materials = Material::lists('nombre', 'id');
     return response()->json($materials);
 }