public function createListingDuration(Request $request)
    {
        $this->validate(
            $request,
            [
                'duration' => 'required|integer',
            ]
        );

        $listing_duration = new ListingDuration();

        $listing_duration->duration = $request->input('duration');

        $listing_duration->save();

        return redirect()->back()->withStatus(trans('mustard::admin.listing_duration_created'));
    }
public function createListingDuration(Request $request)
    {
        $this->validate(
            $request,
            [
                'duration' => 'required|integer',
            ]
        );

        $listing_duration = new ListingDuration();

        $listing_duration->duration = $request->input('duration');

        $listing_duration->save();

        return redirect()->back()->withStatus(trans('mustard::admin.listing_duration_created'));
    }
public function createListingDuration ( Request $ request ) { $ this -> validate ( $ request , [ 'duration' => 'required|integer' , ] ) ; $ listing_duration = new ListingDuration ( ) ; $ listing_duration -> duration = $ request -> input ( 'duration' ) ; $ listing_duration -> save ( ) ; return redirect ( ) -> back ( ) -> withStatus ( trans ( 'mustard::admin.listing_duration_created' ) ) ; }
Create a listing duration.

@return \Illuminate\Http\RedirectResponse
Create a listing duration .