Ejemplo n.º 1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     //
     $cinema = new cinema();
     $cinema->name = Request::get('name');
     //$director=Request::all();
     //return $director;
     $cinema->save();
     return redirect('cinema');
 }
Ejemplo n.º 2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     $directors = director::all();
     $cinemas = cinema::all();
     $movies = movie::all();
     return view('movie.index', compact('cinemas', 'directors', 'movies'));
 }