to generate a new CRUD from any table on your tomato-php generated CRUDs just need to run this command
Copy php artisan tomato-flutter:crud
Copy 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" ;
Copy 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,
];
please note that the generated files will match only APIs generated by TomatoPHP and you need to add APIs routes to the api.php
Copy Route :: middleware ( [ 'auth:sanctum' ] ) -> name ( 'api.' ) -> group ( function () {
Route :: get ( 'customers' , [ \ Modules \ Customers \ Http \ Controllers \ CustomerController ::class , 'index' ] ) -> name ( 'customers.index' ) ;
Route :: post ( 'customers' , [ \ Modules \ Customers \ Http \ Controllers \ CustomerController ::class , 'store' ] ) -> name ( 'customers.store' ) ;
Route :: get ( 'customers/{model}' , [ \ Modules \ Customers \ Http \ Controllers \ CustomerController ::class , 'show' ] ) -> name ( 'customers.show' ) ;
Route :: post ( 'customers/{model}' , [ \ Modules \ Customers \ Http \ Controllers \ CustomerController ::class , 'update' ] ) -> name ( 'customers.update' ) ;
Route :: delete ( 'customers/{model}' , [ \ Modules \ Customers \ Http \ Controllers \ CustomerController ::class , 'destroy' ] ) -> name ( 'customers.destroy' ) ;
} ) ;Change Endpoint