src/Http/Router/Route.php
private function getResourceClosure($controller, $method)
    {
        if ($method == 'show' || $method == 'edit' || $method == 'delete') {
            return function ($id) use ($controller, $method) {
                return $controller::$method($id);
            };
        } elseif ($method == 'update') {
            return function ($request, $id) use ($controller, $method) {
                return $controller::$method($request, $id);
            };
        } elseif ($method == 'insert') {
            return function ($request) use ($controller, $method) {
                return $controller::$method($request);
            };
        } else {
            return function () use ($controller, $method) {
                return $controller::$method();
            };
        }
    }
private function getResourceClosure($controller, $method)
    {
        if ($method == 'show' || $method == 'edit' || $method == 'delete') {
            return function ($id) use ($controller, $method) {
                return $controller::$method($id);
            };
        } elseif ($method == 'update') {
            return function ($request, $id) use ($controller, $method) {
                return $controller::$method($request, $id);
            };
        } elseif ($method == 'insert') {
            return function ($request) use ($controller, $method) {
                return $controller::$method($request);
            };
        } else {
            return function () use ($controller, $method) {
                return $controller::$method();
            };
        }
    }
private function getResourceClosure ( $ controller , $ method ) { if ( $ method == 'show' || $ method == 'edit' || $ method == 'delete' ) { return function ( $ id ) use ( $ controller , $ method ) { return $ controller :: $ method ( $ id ) ; } ; } elseif ( $ method == 'update' ) { return function ( $ request , $ id ) use ( $ controller , $ method ) { return $ controller :: $ method ( $ request , $ id ) ; } ; } elseif ( $ method == 'insert' ) { return function ( $ request ) use ( $ controller , $ method ) { return $ controller :: $ method ( $ request ) ; } ; } else { return function ( ) use ( $ controller , $ method ) { return $ controller :: $ method ( ) ; } ; } }
Return a resource closure for resource route.

@param string $controller
@param string $methode

@return Closure
Return a resource closure for resource route .