Example #1
0
 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     $categorias = CategoriaNoticia::lists('nombre_categoria', 'id');
     return view('noticias.create', ['categorias' => $categorias]);
 }
Example #2
0
 public function categoriaNoticias()
 {
     $categorias = CategoriaNoticia::with('noticia')->get();
     return response()->json($categorias);
 }