skip to Main Content

I am attempting to integrate Laravel 11 with React.js for data retrieval and transmission between the two. However, I cannot locate the routes/api.php file in the latest version of Laravel.

I have searched for others experiencing the same issue, but I have yet to find any similar cases since Laravel 11 was only released a week ago.

2

Answers


  1. https://laravel.com/docs/11.x/routing#api-routes

    If your application will also offer a stateless API, you may enable API routing using the install:api Artisan command:

    php artisan install:api
    

    […] In addition, the install:api command creates the routes/api.php file.

    Login or Signup to reply.
  2. You enable api route

    php artisan install:api
    

    you can refer to this link:enter link description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search