Commit ea3cf477 authored by hangjun83's avatar hangjun83

百化接口

parent 852a703b
...@@ -36,5 +36,16 @@ class RepositoryServiceProvider extends LumenRepositoryServiceProvider ...@@ -36,5 +36,16 @@ class RepositoryServiceProvider extends LumenRepositoryServiceProvider
$this->app->bind($class,$concrete); $this->app->bind($class,$concrete);
}); });
} }
$files = $fileObj->files(base_path('app/Rhawn/Repositories/Contracts'));
if($files){
collect($files)->map(function ($file){
$fileName = $file->getRelativePathname();
list($name,$extend) = explode('.',$fileName);
$class = "App\Rhawn\Repositories\Contracts\\".$name;
$concrete = "App\Rhawn\Repositories\Eloquent\\".$name."Eloquent";
$this->app->bind($class,$concrete);
});
}
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment