diff --git a/Makefile b/Makefile index b58cae0d..0b289df4 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ build: install: schema: - php artisan infyom:scaffold airlines --fieldsFile=database/schema/airlines.json + php artisan infyom:scaffold Airlines --fieldsFile=database/schema/airlines.json docker: @mkdir -p $(CURR_PATH)/tmp/mysql diff --git a/config/app.php b/config/app.php index 1d4ab49e..50e9918b 100755 --- a/config/app.php +++ b/config/app.php @@ -3,52 +3,25 @@ return [ /* - |-------------------------------------------------------------------------- | Application Name - |-------------------------------------------------------------------------- - | - | This value is the name of your application. This value is used when the - | framework needs to place the application's name in a notification or - | any other location as required by the application or its packages. */ 'name' => 'phpVMS', /* - |-------------------------------------------------------------------------- | Application Environment - |-------------------------------------------------------------------------- - | - | This value determines the "environment" your application is currently - | running in. This may determine how you prefer to configure various - | services your application utilizes. Set this in your ".env" file. - | */ - 'env' => env('APP_ENV', 'production'), + 'env' => env('APP_ENV', 'dev'), /* - |-------------------------------------------------------------------------- | Application Debug Mode - |-------------------------------------------------------------------------- - | - | When your application is in debug mode, detailed error messages with - | stack traces will be shown on every error that occurs within your - | application. If disabled, a simple generic error page is shown. - | */ 'debug' => env('APP_DEBUG', true), /* - |-------------------------------------------------------------------------- | Application URL - |-------------------------------------------------------------------------- - | - | This URL is used by the console to properly generate URLs when using - | the Artisan command line tool. You should set this to the root of - | your application so that it is used when running Artisan tasks. - | */ 'url' => env('APP_URL', 'http://localhost'), @@ -65,76 +38,25 @@ return [ */ 'timezone' => 'UTC', - - /* - |-------------------------------------------------------------------------- - | Application Locale Configuration - |-------------------------------------------------------------------------- - | - | The application locale determines the default locale that will be used - | by the translation service provider. You are free to set this value - | to any of the locales which will be supported by the application. - | - */ - 'locale' => 'en', - - /* - |-------------------------------------------------------------------------- - | Application Fallback Locale - |-------------------------------------------------------------------------- - | - | The fallback locale determines the locale to use when the current one - | is not available. You may change the value to correspond to any of - | the language folders that are provided through your application. - | - */ - 'fallback_locale' => 'en', /* |-------------------------------------------------------------------------- | Encryption Key |-------------------------------------------------------------------------- - | - | This key is used by the Illuminate encrypter service and should be set - | to a random, 32 character string, otherwise these encrypted strings - | will not be safe. Please do this before deploying an application! - | */ 'key' => env('APP_KEY'), - 'cipher' => 'AES-256-CBC', /* - |-------------------------------------------------------------------------- | Logging Configuration - |-------------------------------------------------------------------------- - | - | Here you may configure the log settings for your application. Out of - | the box, Laravel uses the Monolog PHP logging library. This gives - | you a variety of powerful log handlers / formatters to utilize. - | - | Available Settings: "single", "daily", "syslog", "errorlog" - | */ 'log' => env('APP_LOG', 'single'), - 'log_level' => env('APP_LOG_LEVEL', 'debug'), - /* - |-------------------------------------------------------------------------- - | Autoloaded Service Providers - |-------------------------------------------------------------------------- - | - | The service providers listed here will be automatically loaded on the - | request to your application. Feel free to add your own services to - | this array to grant expanded functionality to your applications. - | - */ - 'providers' => [ /* @@ -184,17 +106,6 @@ return [ ], - /* - |-------------------------------------------------------------------------- - | Class Aliases - |-------------------------------------------------------------------------- - | - | This array of class aliases will be registered when this application - | is started. However, feel free to register as many as you wish as - | the aliases are "lazy" loaded so they don't hinder performance. - | - */ - 'aliases' => [ 'App' => Illuminate\Support\Facades\App::class, diff --git a/config/database.php b/config/database.php index 9f3ad77a..7686f866 100755 --- a/config/database.php +++ b/config/database.php @@ -26,7 +26,7 @@ return [ | */ - 'default' => env('DB_CONNECTION', 'mysql'), + 'default' => env('DB_CONNECTION', 'sqlite'), /* |-------------------------------------------------------------------------- @@ -48,7 +48,7 @@ return [ 'sqlite' => [ 'driver' => 'sqlite', - 'database' => env('DB_DATABASE', database_path('database.sqlite')), + 'database' => env('DB_DATABASE', database_path('tmp/database.sqlite')), 'prefix' => '', ], diff --git a/config/infyom/laravel_generator.php b/config/infyom/laravel_generator.php index 654e0c3f..62a3ade4 100644 --- a/config/infyom/laravel_generator.php +++ b/config/infyom/laravel_generator.php @@ -2,173 +2,72 @@ return [ - /* - |-------------------------------------------------------------------------- - | Paths - |-------------------------------------------------------------------------- - | - */ - 'path' => [ - 'migration' => base_path('database/migrations/'), - 'model' => app_path('Models/'), - 'datatables' => app_path('DataTables/'), - 'repository' => app_path('Repositories/'), - 'routes' => base_path('routes/web.php'), - 'api_routes' => base_path('routes/api.php'), - 'request' => app_path('Http/Requests/'), - 'api_request' => app_path('Http/Requests/API/'), - 'controller' => app_path('Http/Controllers/'), - 'api_controller' => app_path('Http/Controllers/API/'), - 'test_trait' => base_path('tests/traits/'), - 'repository_test' => base_path('tests/'), - 'api_test' => base_path('tests/'), - 'views' => base_path('resources/views/'), - 'schema_files' => base_path('resources/model_schemas/'), - 'templates_dir' => base_path('resources/infyom/infyom-generator-templates/'), - 'modelJs' => base_path('resources/assets/js/models/'), ], - /* - |-------------------------------------------------------------------------- - | Namespaces - |-------------------------------------------------------------------------- - | - */ - 'namespace' => [ - 'model' => 'App\Models', - 'datatables' => 'App\DataTables', - 'repository' => 'App\Repositories', - 'controller' => 'App\Http\Controllers', - 'api_controller' => 'App\Http\Controllers\API', - 'request' => 'App\Http\Requests', - 'api_request' => 'App\Http\Requests\API', ], - /* - |-------------------------------------------------------------------------- - | Templates - |-------------------------------------------------------------------------- - | - */ - 'templates' => 'adminlte-templates', - /* - |-------------------------------------------------------------------------- - | Model extend class - |-------------------------------------------------------------------------- - | - */ - 'model_extend_class' => 'Eloquent', - /* - |-------------------------------------------------------------------------- - | API routes prefix & version - |-------------------------------------------------------------------------- - | - */ - 'api_prefix' => 'api', - 'api_version' => 'v1', - /* - |-------------------------------------------------------------------------- - | Options - |-------------------------------------------------------------------------- - | - */ - 'options' => [ - 'softDelete' => true, - 'tables_searchable_default' => false, ], - /* - |-------------------------------------------------------------------------- - | Prefixes - |-------------------------------------------------------------------------- - | - */ 'prefixes' => [ - 'route' => '', // using admin will create route('admin.?.index') type routes - 'path' => '', - - 'view' => '', // using backend will create return view('backend.?.index') type the backend views directory - - 'public' => '', + 'view' => 'admin', + 'public' => 'admin', ], - /* - |-------------------------------------------------------------------------- - | Add-Ons - |-------------------------------------------------------------------------- - | - */ 'add_on' => [ - 'swagger' => false, - 'tests' => true, - 'datatables' => false, - 'menu' => [ - 'enabled' => false, - 'menu_file' => 'layouts/menu.blade.php', ], ], - /* - |-------------------------------------------------------------------------- - | Timestamp Fields - |-------------------------------------------------------------------------- - | - */ 'timestamps' => [ - 'enabled' => true, - 'created_at' => 'created_at', - 'updated_at' => 'updated_at', - 'deleted_at' => 'deleted_at', ], diff --git a/database/schema/airlines.json b/database/schema/airlines.json index 9c968aa1..3af8026c 100644 --- a/database/schema/airlines.json +++ b/database/schema/airlines.json @@ -17,6 +17,20 @@ "validations": "required", "searchable": true }, + { + "name": "name", + "dbType": "string", + "htmlType": "text", + "validations": "required", + "searchable": true + }, + { + "name": "enabled", + "dbType": "boolean", + "htmlType": "checkbox", + "validations": "", + "searchable": false + }, { "name": "created_at", "dbType": "timestamp", diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index a46aa6c6..69acd824 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -39,7 +39,7 @@
Sign In
+Sign in to start your session