app/Http/Controllers/Admin/BusController.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(StoreBusRequest $request)
    {
        Auth::user()->company()->buses()->create($request->validated());
        return redirect()->route('admin.buses.index')
            ->with('success', 'Bus created successfully.');
    }
public function store ( StoreBusRequest $ request ) { Auth :: user ( ) -> company ( ) -> buses ( ) -> create ( $ request -> validated ( ) ) ; return redirect ( ) -> route ( 'admin.buses.index' ) -> with ( 'success' , 'Bus created successfully.' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
//