It creates API Routes and Controllers for your CRUD menu item, so you can use it from your mobile app or front-end.

Whenever you create or edit a CRUD, there's a checkbox whether to create API controller (see above).

If checked, there's a separate Controller created in app/Http/Controllers/Api/V1/Admin folder.
namespace App\Http\Controllers\Api\V1\Admin;

use App\Book;
use App\Http\Controllers\Controller;
use App\Http\Requests\StoreBookRequest;
use App\Http\Requests\UpdateBookRequest;

class BooksApiController extends Controller
{
    public function index()
    {
        $books = Book::all();

        return $books;
    }

    public function store(StoreBookRequest $request)
    {
        return Book::create($request->all());
    }

    public function update(UpdateBookRequest $request, Book $book)
    {
        return $book->update($request->all());
    }

    public function show(Book $book)
    {
        return $book;
    }

    public function destroy(Book $book)
    {
        return $book->delete();
    }
}
Also it's added to routes/api.php file, like this:
Route::group(['prefix' => 'admin', 'as' => 'admin.', 'namespace' => 'Api\V1\Admin'], function () {
    Route::apiResource('books', 'BooksApiController');
});
You can turn this function on/off for every controller separately.

Notice: our tool is generating API routes but they are not protected by any Auth mechanism, you need to take care of this yourself after download. The most popular way is using Laravel Passport.

More information





If you can't find what you're looking for, use live-chat on bottom-right or email us info@laraveldaily.com


For latest news and released features - see our changelog