I have a text input where the user has to type the name of the movie and I also have a movie database in which when the user typed the title of the movie, the title of the movie will match the title on the movies database then it should get the movie_id of the movie in movies table and save it on the schedules table.
$movtitle = $request->Cinename;
$mov_tit = Schedule::where('movtitle', '=', $movie->title);
$mov_id = find($movie->movie_id where $title = $mov_tit);
//this is wrong. what is the correct syntax??