app/Http/Controllers/ServiceTypesController.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(ServiceTypeRequest $request)
    {
        $serviceType = auth()->user()->serviceTypes()->create($request->validated());
        return [
            'object' => $serviceType,
            'message' => __('messages.service_types_created_status')
        ];
    }
public function store ( ServiceTypeRequest $ request ) { $ serviceType = auth ( ) -> user ( ) -> serviceTypes ( ) -> create ( $ request -> validated ( ) ) ; return [ 'object' => $ serviceType , 'message' => __ ( 'messages.service_types_created_status' ) ] ; }
Store a newly created resource in storage.
Store a newly created resource in storage .