app/Http/Controllers/API/CourseController.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)
    {
            $cors = new Course([
                'title' => $request->title,
            ]);
            $cors->save();
            return response()->json('The Course successfully added');
    }
public function store ( Request $ request ) { $ cors = new Course ( [ 'title' => $ request -> title , ] ) ; $ cors -> save ( ) ; return response ( ) -> json ( 'The Course successfully added' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .