The app_path function returns the fully qualified path to your application's app directory. You may also use the app_path function to generate a fully qualified path to a file relative to the application directory:
<?php $path = app_path();

$path = app_path('Http/Controllers/Controller.php');
<?php     protected function registerAppExtensions($folder, $requiredClass)

    {

        if (! $this->app['files']->exists($path = app_path($folder))) {

            return;

        }