/** * 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'); }
/** * 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')); }