app/Http/Controllers/ApiController.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(Api $api)
  {
        $api = new Api();
        $api->API_key=request('api_key');
        $shift->save();
        Branc h::create(request(['branch_name','location']));
        return redirect('/api');
      }
public function store ( Api $ api ) { $ api = new Api ( ) ; $ api -> API_key = request ( 'api_key' ) ; $ shift -> save ( ) ; return redirect ( '/api' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
// /*  $request->validate([
            'shift_name'=>'required',
            'start_time'=>'required',
            'end_time'=>'required'
        ]);*/ //Branc h::create(request(['branch_name','location']));