Content-API in existing Laravel-App

Hello there,

I built a Laravel/Vue-based website, which is linked to another Laravel-instance using it's API.

The Vue-frontend is using axios to request Laravel API-routes, which itself are using the API of the other Laravel-instance.

This is how it works:

Vue-Frontend ---> GET /api/product/1 ---> [email protected] ---> 
Sends Guzzle-GET-Request to remote Laravel API.

Now I want to include statamic. To archive this, I have to solve the following problems:

  1. It would be great, if statamic's routes would be available at /api/blog/.... Is this possible?
  2. Reading statamic's docs, I did not get an idea how the content is structured in those API-responses. Could you give me a more detailed example?
  3. To redirect all GET-requests to vue-router, routes/web.php looks like this: Route::get('/{any}', '[email protected]')->where('any', '.*');. How does statamic register the routes for the control panel?
  4. Now the most tricky one: The website does not use Laravel's default user table, but implements it's own UserRepository. But not every user that is allowed to log in this way should be able to log in to statamic's cp. Is it possible to handle this?
>>>>>>> Unanswered <<<<<<<
0 Replies
1 Follower