app/Http/Controllers/RenewalFrequencyController.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(RenewalFrequencyRequest $request)
    {
        $renewal_frequency = auth()->user()->renewalFrequencies()->create($request->validated());
        return [
            'object' => [
                'id' => $renewal_frequency->id,
                'name' => $renewal_frequency->frequency
            ],
            'message' => __('messages.renewal_frequency_created_status')
        ];
    }
public function store ( RenewalFrequencyRequest $ request ) { $ renewal_frequency = auth ( ) -> user ( ) -> renewalFrequencies ( ) -> create ( $ request -> validated ( ) ) ; return [ 'object' => [ 'id' => $ renewal_frequency -> id , 'name' => $ renewal_frequency -> frequency ] , 'message' => __ ( 'messages.renewal_frequency_created_status' ) ] ; }
Store a newly created resource in storage.
Store a newly created resource in storage .