app/Http/Controllers/Admin/ScreenController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $user = screen::create([
            'user_id' => $request->user,
            'date' => $request->date,
            'screen_location' => $request->description,
        ]);
        if($user){
            return redirect()->route('screen.index')->with('message','Record Added Successfully');
        }else{
            return redirect()->route('screen.create')->with('message','Something Went Wrong');
        }
    }
public function store ( Request $ request ) { $ user = screen :: create ( [ 'user_id' => $ request -> user , 'date' => $ request -> date , 'screen_location' => $ request -> description , ] ) ; if ( $ user ) { return redirect ( ) -> route ( 'screen.index' ) -> with ( 'message' , 'Record Added Successfully' ) ; } else { return redirect ( ) -> route ( 'screen.create' ) -> with ( 'message' , 'Something Went Wrong' ) ; } }
Store a newly created resource in storage.
Store a newly created resource in storage .