diff --git a/app/Ship/Configs/debugbar.php b/app/Ship/Configs/debugbar.php index cfd8cff67..fe3b192d7 100644 --- a/app/Ship/Configs/debugbar.php +++ b/app/Ship/Configs/debugbar.php @@ -42,6 +42,48 @@ 'port' => 2304, // Port to use with the "socket" driver ], + /* + |-------------------------------------------------------------------------- + | Editor + |-------------------------------------------------------------------------- + | + | Choose your preferred editor to use when clicking file name. + | + | Supported: "phpstorm", "vscode", "vscode-insiders", "vscode-remote", + | "vscode-insiders-remote", "vscodium", "textmate", "emacs", + | "sublime", "atom", "nova", "macvim", "idea", "netbeans", + | "xdebug", "espresso" + | + */ + + 'editor' => env('DEBUGBAR_EDITOR', 'phpstorm'), + + /* + |-------------------------------------------------------------------------- + | Remote Path Mapping + |-------------------------------------------------------------------------- + | + | If you are using a remote dev server, like Laravel Homestead, Docker, or + | even a remote VPS, it will be necessary to specify your path mapping. + | + | Leaving one, or both of these, empty or null will not trigger the remote + | URL changes and Debugbar will treat your editor links as local files. + | + | "remote_sites_path" is an absolute base path for your sites or projects + | in Homestead, Vagrant, Docker, or another remote development server. + | + | Example value: "/home/vagrant/Code" + | + | "local_sites_path" is an absolute base path for your sites or projects + | on your local computer where your IDE or code editor is running on. + | + | Example values: "/Users//Code", "C:\Users\\Documents\Code" + | + */ + + 'remote_sites_path' => env('DEBUGBAR_REMOTE_SITES_PATH', ''), + 'local_sites_path' => env('DEBUGBAR_LOCAL_SITES_PATH', ''), + /* |-------------------------------------------------------------------------- | Vendors @@ -67,6 +109,9 @@ | you can use this option to disable sending the data through the headers. | | Optionally, you can also send ServerTiming headers on ajax requests for the Chrome DevTools. + | + | Note for your request to be identified as ajax requests they must either send the header + | X-Requested-With with the value XMLHttpRequest (most JS libraries send this), or have application/json as a Accept header. */ 'capture_ajax' => true, @@ -104,24 +149,24 @@ */ 'collectors' => [ - 'phpinfo' => false, // Php version + 'phpinfo' => true, // Php version 'messages' => true, // Messages 'time' => true, // Time Datalogger 'memory' => true, // Memory usage 'exceptions' => true, // Exception displayer 'log' => true, // Logs from Monolog (merged in messages if enabled) 'db' => true, // Show database (PDO) queries and bindings - 'views' => false, // Views with their data + 'views' => true, // Views with their data 'route' => true, // Current route information - 'auth' => true, // Display Laravel authentication status - 'gate' => true, // Display Laravel Gate checks + 'auth' => false, // Display Laravel authentication status + 'gate' => true, // Display Laravel Gate checks 'session' => true, // Display session data 'symfony_request' => true, // Only one can be enabled.. 'mail' => true, // Catch mail messages 'laravel' => false, // Laravel version and environment 'events' => false, // All events fired 'default_request' => false, // Regular or special Symfony request logger - 'logs' => true, // Add the latest log messages + 'logs' => false, // Add the latest log messages 'files' => false, // Show the included files 'config' => false, // Display config settings 'cache' => false, // Display cache events @@ -147,6 +192,7 @@ 'backtrace' => true, // Use a backtrace to find the origin of the query in your files. 'backtrace_exclude_paths' => [], // Paths to exclude from backtrace. (in addition to defaults) 'timeline' => false, // Add the queries to the timeline + 'duration_background' => true, // Show shaded background on each query relative to how long it took to execute. 'explain' => [ // Show EXPLAIN output on queries 'enabled' => false, 'types' => ['SELECT'], // Deprecated setting, is always only SELECT @@ -158,6 +204,7 @@ 'full_log' => false, ], 'views' => [ + 'timeline' => false, // Add the views to the timeline (Experimental) 'data' => false, //Note: Can slow down the application, because the data can be quite large.. ], 'route' => [ @@ -214,5 +261,15 @@ | Switches between light and dark theme. If set to auto it will respect system preferences | Possible values: auto, light, dark */ - 'theme' => 'auto', + 'theme' => env('DEBUGBAR_THEME', 'auto'), + + /* + |-------------------------------------------------------------------------- + | Backtrace stack limit + |-------------------------------------------------------------------------- + | + | By default, the DebugBar limits the number of frames returned by the 'debug_backtrace()' function. + | If you need larger stacktraces, you can increase this number. Setting it to 0 will result in no limit. + */ + 'debug_backtrace_limit' => 50, ]; diff --git a/app/Ship/Configs/fractal.php b/app/Ship/Configs/fractal.php index ebec0ded0..58d76dbfc 100644 --- a/app/Ship/Configs/fractal.php +++ b/app/Ship/Configs/fractal.php @@ -1,7 +1,6 @@ '_ide_helper.php', + /* + |-------------------------------------------------------------------------- + | Models filename + |-------------------------------------------------------------------------- + | + | The default filename for the models helper file + | + */ + + 'models_filename' => '_ide_helper_models.php', + /* |-------------------------------------------------------------------------- | Where to write the PhpStorm specific meta file @@ -48,7 +59,7 @@ | */ - 'include_factory_builders' => false, + 'include_factory_builders' => true, /* |-------------------------------------------------------------------------- @@ -128,7 +139,7 @@ */ 'model_locations' => [ - 'app/Containers/*/Models', + 'app/Containers/*/*/Models', ], /* @@ -144,6 +155,21 @@ ], + /* + |-------------------------------------------------------------------------- + | Models hooks + |-------------------------------------------------------------------------- + | + | Define which hook classes you want to run for models to add custom information + | + | Hooks should implement Barryvdh\LaravelIdeHelper\Contracts\ModelHookInterface. + | + */ + + 'model_hooks' => [ + // App\Support\IdeHelper\MyModelHook::class + ], + /* |-------------------------------------------------------------------------- | Extra classes @@ -158,18 +184,7 @@ 'Session' => ['Illuminate\Session\Store'], ], - 'magic' => [ - 'Log' => [ - 'debug' => 'Monolog\Logger::addDebug', - 'info' => 'Monolog\Logger::addInfo', - 'notice' => 'Monolog\Logger::addNotice', - 'warning' => 'Monolog\Logger::addWarning', - 'error' => 'Monolog\Logger::addError', - 'critical' => 'Monolog\Logger::addCritical', - 'alert' => 'Monolog\Logger::addAlert', - 'emergency' => 'Monolog\Logger::addEmergency', - ], - ], + 'magic' => [], /* |-------------------------------------------------------------------------- @@ -202,7 +217,7 @@ | The value of the array is an array of type mappings. Key is the name of the custom type, | (for example, "jsonb" from Postgres 9.4) and the value is the name of the corresponding Doctrine2 type (in | our case it is 'json_array'. Doctrine types are listed here: - | http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html + | https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html#types | | So to support jsonb in your models when working with Postgres, just add the following entry to the array below: | @@ -263,7 +278,7 @@ | magic methods and properties. | */ - 'include_class_docblocks' => false, + 'include_class_docblocks' => true, /* |-------------------------------------------------------------------------- @@ -289,4 +304,16 @@ */ 'additional_relation_types' => [], + /* + |-------------------------------------------------------------------------- + | Run artisan commands after migrations to generate model helpers + |-------------------------------------------------------------------------- + | + | The specified commands should run after migrations are finished running. + | + */ + 'post_migrate' => [ + 'ide-helper:models --nowrite', + ], + ]; diff --git a/app/Ship/Configs/notification.php b/app/Ship/Configs/notification.php index 8b5a7d900..d53a23cb0 100644 --- a/app/Ship/Configs/notification.php +++ b/app/Ship/Configs/notification.php @@ -1,18 +1,16 @@ [ 'database', // 'mail', - ] - + ], ]; diff --git a/app/Ship/Configs/repository.php b/app/Ship/Configs/repository.php index 38253090a..6796ddbae 100644 --- a/app/Ship/Configs/repository.php +++ b/app/Ship/Configs/repository.php @@ -18,7 +18,7 @@ 'limit' => env('PAGINATION_LIMIT_DEFAULT', 10), - // if enabled it allows users to skip pagination by passing `?limit=0`. + // if enabled it allows users to skip pagination by passing `?limit=0`. 'skip' => env('PAGINATION_SKIP', false), ], @@ -34,8 +34,8 @@ JsonApiSerializer */ - 'fractal' => [ - 'params' => [ + 'fractal' => [ + 'params' => [ 'include' => 'include', ], 'serializer' => League\Fractal\Serializer\DataArraySerializer::class, @@ -47,7 +47,7 @@ |-------------------------------------------------------------------------- | */ - 'cache' => [ + 'cache' => [ /* |-------------------------------------------------------------------------- | Cache Status @@ -56,7 +56,7 @@ | Enable or disable cache | */ - 'enabled' => env('ELOQUENT_QUERY_CACHE', false), + 'enabled' => env('ELOQUENT_QUERY_CACHE', false), /* |-------------------------------------------------------------------------- @@ -66,7 +66,7 @@ | Time of expiration cache | */ - 'minutes' => env('ELOQUENT_QUERY_CACHE_TIME', 30), + 'minutes' => env('ELOQUENT_QUERY_CACHE_TIME', 30), /* |-------------------------------------------------------------------------- @@ -86,7 +86,7 @@ | | */ - 'clean' => [ + 'clean' => [ /* |-------------------------------------------------------------------------- @@ -106,14 +106,14 @@ | delete : Clear Cache on delete Entry in repository | */ - 'on' => [ + 'on' => [ 'create' => true, 'update' => true, 'delete' => true, ], ], - 'params' => [ + 'params' => [ /* |-------------------------------------------------------------------------- | Skip Cache Params @@ -142,7 +142,7 @@ | 'except' =>['find'], */ 'allowed' => [ - 'only' => null, + 'only' => null, 'except' => null, ], ], @@ -155,7 +155,7 @@ | Settings of request parameters names that will be used by Criteria | */ - 'criteria' => [ + 'criteria' => [ /* |-------------------------------------------------------------------------- | Accepted Conditions @@ -174,7 +174,7 @@ 'acceptedConditions' => [ '=', 'like', - 'in' + 'in', ], /* |-------------------------------------------------------------------------- @@ -214,15 +214,15 @@ | http://prettus.local/?search=lorem&searchJoin=or | */ - 'params' => [ - 'search' => 'search', + 'params' => [ + 'search' => 'search', 'searchFields' => 'searchFields', - 'filter' => 'l5_filter', // we will override the filter in apiato (using fractal) - 'orderBy' => 'orderBy', - 'sortedBy' => 'sortedBy', - 'with' => 'l5_with', // use `include` instead (provided by fractal) - 'searchJoin' => 'searchJoin', - 'withCount' => 'withCount' + 'filter' => 'l5_filter', // we will override the filter in apiato (using fractal) + 'orderBy' => 'orderBy', + 'sortedBy' => 'sortedBy', + 'with' => 'l5_with', // use `include` instead (provided by fractal) + 'searchJoin' => 'searchJoin', + 'withCount' => 'withCount', ], ], /* @@ -231,20 +231,20 @@ |-------------------------------------------------------------------------- | */ - 'generator' => [ - 'basePath' => env('SRC_PATH', app()->path()), + 'generator' => [ + 'basePath' => env('SRC_PATH', app()->path()), 'rootNamespace' => env('ROOT_NAMESPACE', 'App').'\\', 'stubsOverridePath' => app()->path(), - 'paths' => [ - 'models' => 'Entities', + 'paths' => [ + 'models' => 'Entities', 'repositories' => 'Repositories', - 'interfaces' => 'Repositories', + 'interfaces' => 'Repositories', 'transformers' => 'Transformers', - 'presenters' => 'Presenters', - 'validators' => 'Validators', - 'controllers' => 'Http/Controllers', - 'provider' => 'RepositoryServiceProvider', - 'criteria' => 'Criteria' + 'presenters' => 'Presenters', + 'validators' => 'Validators', + 'controllers' => 'Http/Controllers', + 'provider' => 'RepositoryServiceProvider', + 'criteria' => 'Criteria', ], ], ];