Osama Mohammed
Osama Mohammed

Reputation: 2861

create API and Control panel in two separate project

if i want to create Restful Api with control panel (same database and table), can i create C Panel with laravel, and API with another laravel project or Lumen? it is best way? if it is possible, what about (storage), how can i make it shared between this two project.

Upvotes: 1

Views: 205

Answers (1)

balistikbill
balistikbill

Reputation: 96

In Laravel you can have /api routes and web routes. So, you could use the same project if you want to avoid unnecessary complexity if it's not needed. Not sure of your app idea, but you can definitely do it with one Laravel project which would make things much easier if your project doesn't require separate applications for front end and api.

In the /routes directory of your Laravel project you have api.php (routes prefixed with API by default) and your web.php which is where your web routes can live.

Upvotes: 1

Related Questions