app/Http/Controllers/dashboard/admin/MeetingsController.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($this->rules);
        $data = [
            "name" => $request->post('name'),
            "description" => $request->post('description'),
            "date" => $request->post('date'),
            "start_at" => $request->post('start_at'),
            "end_at" => $request->post('end_at'),
            "subject_id" => $request->post('subject_id'),
            "link" => $request->post('link'),
        ];
        $response = new Meetings($data);
        if (!$response->save()) return $this->status();
        return $this->status('success', 'create new meeting success');
    }
public function store ( Request $ request ) { $ request -> validate ( $ this -> rules ) ; $ data = [ " name " => $ request -> post ( 'name' ) , " description " => $ request -> post ( 'description' ) , " date " => $ request -> post ( 'date' ) , " start_at " => $ request -> post ( 'start_at' ) , " end_at " => $ request -> post ( 'end_at' ) , " subject_id " => $ request -> post ( 'subject_id' ) , " link " => $ request -> post ( 'link' ) , ] ; $ response = new Meetings ( $ data ) ; if ( ! $ response -> save ( ) ) return $ this -> status ( ) ; return $ this -> status ( 'success' , 'create new meeting success' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .