app/Http/Controllers/DeviceController.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(Device $device)
  {
        $device = new Device();
        $device->Device_id=request('device_id');
        $device->status=request('status');
   $device->save();
        Branc h::create(request(['branch_name','location']));
        return redirect('/device');
      }
public function store ( Device $ device ) { $ device = new Device ( ) ; $ device -> Device_id = request ( 'device_id' ) ; $ device -> status = request ( 'status' ) ; $ device -> save ( ) ; return redirect ( '/device' ) ; }
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']));