app/Http/Controllers/ServicesController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        if(request()->wantsJson() || request()->expectsJson()) {
            $services = Auth::user()->services()->with('renewalsUnresolved','nextRenewal', 'provider', 'customer', 'serviceType')->get();
            return $this->getServicesDataTablesTraits($services);
        }
        return view('services.index');
    }
public function index ( ) { if ( request ( ) -> wantsJson ( ) || request ( ) -> expectsJson ( ) ) { $ services = Auth :: user ( ) -> services ( ) -> with ( 'renewalsUnresolved' , 'nextRenewal' , 'provider' , 'customer' , 'serviceType' ) -> get ( ) ; return $ this -> getServicesDataTablesTraits ( $ services ) ; } return view ( 'services.index' ) ; }
Display a listing of the resource.
Display a listing of the resource .