Adding Schema Support to API Generator
How Schema Support Works (Upcoming Feature)
We're working on enhancing the API Generator with schema support. This feature lets you define your database table structure directly from the command line, and it will generate factory model migrations, requests, and all specified data based on this schema:
php artisan api:generate ModelName --schema="column1:string,column2:integer,column3:datetime"
Note: The schema feature is inspired by the Laravel 5 Generators Extended package.
Supercharge your API development with the API Toolkit, using standardized responses, dynamic pagination, advanced filtering, one-click full CRUD setup, logic clarity, media mastery, and crystal-clear enums. Let's elevate your development journey with high-performance APIs!
Crafting responses that clients can easily understand becomes a breeze. With the toolkit's standardized response formats, your communication is seamless, saving you time and effort.
$this->responseSuccess('Car created successfully', $car);
Don't fuss over managing the number of results per page. The dynamic pagination feature adapts effortlessly to your needs, giving you control without complications.
$users = User::dynamicPaginate();
Refine query results with simplicity. The powerful filtering system lets you filter, sort, search, and even include relationships with ease.
Car::useFilters()->get();
Say goodbye to manual file setup! The API Generator does the hard work for you by creating key files from migrations to controllers automatically. Just use one simple command to kickstart your API development.
php artisan api:generate ModelName --all
Tackle complex business logic with Actions. These gems follow the command pattern, boosting readability and maintenance for your code.
app(CreateCar::class)->execute($data);
Handle file uploads and deletions like a pro. The Media Helper streamlines media management, leaving you with clean and organized file handling.
$filePath = MediaHelper::uploadFile($file, $path);
Say goodbye to hardcoded values. Enums replace them with meaningful constants, resulting in cleaner, more understandable code.
namespace App\Enums;
class UserTypes extends Enum
{
public const ADMIN = 'admin';
public const STUDENT = 'student';
}
Access our documentation to unlock the full potential of the Laravel API Toolkit: