app/Http/Controllers/ServiceRenewalsController.php
/**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
Show the form for creating a new resource.
@return \Illuminate\Http\Response
Show the form for creating a new resource . @return \ Illuminate \ Http \ Response
public function create(Service $service)
    {
        $renewal = new Renewal([
            'deadline' => $service->calcNextDeadline(),
            'amount' => $service->lastRenewalInsert()->amount
        ]);
        return [
            'view' => view('renewals.create', compact('renewal', 'service'))->render()
        ];
    }
public function create ( Service $ service ) { $ renewal = new Renewal ( [ 'deadline' => $ service -> calcNextDeadline ( ) , 'amount' => $ service -> lastRenewalInsert ( ) -> amount ] ) ; return [ 'view' => view ( 'renewals.create' , compact ( 'renewal' , 'service' ) ) -> render ( ) ] ; }
Show the form for creating a new resource.
Show the form for creating a new resource .
// Create a new renewal object