app/Http/Controllers/StudentsController.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)
    {
       $request->validate([
        'class_id' => 'required',
        'section_id' => 'required',
        'roll_no' => 'required',
        'student_name' => 'required',
        'fathers_name' => 'required',
        'mobile'=> 'required',
        'address'=> 'required',
    ]);
    Students::create($request->all());
        return redirect()->route('student.index')->with('success','One Row Inserted Successfully');
    }
public function store ( Request $ request ) { $ request -> validate ( [ 'class_id' => 'required' , 'section_id' => 'required' , 'roll_no' => 'required' , 'student_name' => 'required' , 'fathers_name' => 'required' , 'mobile' => 'required' , 'address' => 'required' , ] ) ; Students :: create ( $ request -> all ( ) ) ; return redirect ( ) -> route ( 'student.index' ) -> with ( 'success' , 'One Row Inserted Successfully' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .