🧲Generate CRUD
to generate a new CRUD from any table on your tomato-php generated CRUDs just need to run this command
php artisan tomato-flutter:crudnow you will get a new module inside your app dir /flutter/APP_NAME/lib/app/modules/TABLE_NAME to allow your module inside /flutter/APP_NAME/lib/app/modules/Modules.dart add this line
export 'Auth/AuthModule.dart';
export "Dashboard/DashboardModule.dart";
export "Settings/SettingsModule.dart";
export "Splash/SplashModule.dart";
export "Profile/ProfileModule.dart";
export "Forms/FormsModule.dart";
export "TABLE_NAME/TABLE_NAMEModule.dart";and after that allow the modules to route inside the file /flutter/APP_NAME/lib/routes/Router.dart add this line
import 'package:get/get.dart';
import '/app/modules/Modules.dart';
List<GetPage> routes = [
/// Basic Routes
...splashRoutes,
/// Auth Routes
...authRoutes,
/// Dashboard Routes
...dashboardRoutes,
/// Setting Routes
...settingsRoutes,
/// Profile Routes
...profileRoutes,
...formsRoutes,
...tableNameRoutes,
];Add Endpoints to Backend
please note that the generated files will match only APIs generated by TomatoPHP and you need to add APIs routes to the api.php
Last updated
Was this helpful?