An API skeleton #39514
-
An API skeleton, generated via something like: laravel new project-orange —api which will remove all files related to views, assets, laravel mix, package.json and other similar files that are not used in an API only project. Link to original (c) @davorminchorov |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
Here's the list of changes I am thinking of:
In the
and I updated the
It's just an example but It could be updated with all of the values that the default I also created a If anyone has any other ideas about changes, feel free to share them. |
Beta Was this translation helpful? Give feedback.
-
I wouldn't redirect the '/' web route to the api. Say you use If your api is at $this->routes(function () {
Route::prefix('api')->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
}); This can be reduced to: $this->routes(function () {
Route::middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}); Also getting rid of the |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Is there a branch or issue that work has begun on this idea that we can begin to contribute to. |
Beta Was this translation helpful? Give feedback.
Taylor is already working on the solution.