included models to ide helper

This commit is contained in:
Denis Duliçi 2020-08-17 11:18:41 +03:00
parent 87548609a6
commit 3eec900bc6
3 changed files with 73 additions and 35 deletions

1
.gitignore vendored
View File

@ -88,6 +88,7 @@ npm-debug.log
.env.example .env.example
robots.txt robots.txt
_ide_helper.php _ide_helper.php
_ide_helper_models.php
.phpstorm.meta.php .phpstorm.meta.php
/storage/debugbar/* /storage/debugbar/*
.phpunit.result.cache .phpunit.result.cache

View File

@ -23,7 +23,7 @@
"akaunting/version": "1.0.*", "akaunting/version": "1.0.*",
"barryvdh/laravel-debugbar": "3.3.*", "barryvdh/laravel-debugbar": "3.3.*",
"barryvdh/laravel-dompdf": "0.*", "barryvdh/laravel-dompdf": "0.*",
"barryvdh/laravel-ide-helper": "2.7.*", "barryvdh/laravel-ide-helper": "2.8.*",
"bkwld/cloner": "3.7.*", "bkwld/cloner": "3.7.*",
"consoletvs/charts": "6.5.*", "consoletvs/charts": "6.5.*",
"dingo/api": "3.0.*", "dingo/api": "3.0.*",
@ -104,6 +104,7 @@
"Illuminate\\Foundation\\ComposerScripts::postInstall", "Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan ide-helper:generate", "php artisan ide-helper:generate",
"php artisan ide-helper:meta", "php artisan ide-helper:meta",
"php artisan ide-helper:models --nowrite",
"php artisan clear-compiled", "php artisan clear-compiled",
"composer dump-autoload" "composer dump-autoload"
], ],
@ -111,6 +112,7 @@
"Illuminate\\Foundation\\ComposerScripts::postUpdate", "Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan ide-helper:generate", "php artisan ide-helper:generate",
"php artisan ide-helper:meta", "php artisan ide-helper:meta",
"php artisan ide-helper:models --nowrite",
"php artisan clear-compiled", "php artisan clear-compiled",
"composer dump-autoload" "composer dump-autoload"
], ],

View File

@ -1,6 +1,6 @@
<?php <?php
return [ return array(
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -10,9 +10,20 @@ return [
| The default filename (without extension) and the format (php or json) | The default filename (without extension) and the format (php or json)
| |
*/ */
'filename' => '_ide_helper', 'filename' => '_ide_helper',
'format' => 'php', 'format' => 'php',
/*
|--------------------------------------------------------------------------
| Where to write the PhpStorm specific meta file
|--------------------------------------------------------------------------
|
| PhpStorm also supports the directory `.phpstorm.meta.php/` with arbitrary
| files in it, should you need additional files for your project; e.g.
| `.phpstorm.meta.php/laravel_ide_Helper.php'.
|
*/
'meta_filename' => '.phpstorm.meta.php', 'meta_filename' => '.phpstorm.meta.php',
/* /*
@ -23,6 +34,7 @@ return [
| Set to true to generate commonly used Fluent methods | Set to true to generate commonly used Fluent methods
| |
*/ */
'include_fluent' => true, 'include_fluent' => true,
/* /*
@ -34,6 +46,7 @@ return [
| method auto-completion. | method auto-completion.
| |
*/ */
'include_factory_builders' => false, 'include_factory_builders' => false,
/* /*
@ -44,7 +57,19 @@ return [
| Set to false to disable write magic methods of model | Set to false to disable write magic methods of model
| |
*/ */
'write_model_magic_where' => true,
'write_model_magic_where' => false,
/*
|--------------------------------------------------------------------------
| Write Model relation count properties
|--------------------------------------------------------------------------
|
| Set to false to disable writing of relation count properties to model DocBlocks.
|
*/
'write_model_relation_count_properties' => false,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -58,6 +83,7 @@ return [
| Please be aware that this setting changes a file within the /vendor directory. | Please be aware that this setting changes a file within the /vendor directory.
| |
*/ */
'write_eloquent_model_mixins' => false, 'write_eloquent_model_mixins' => false,
/* /*
@ -69,11 +95,12 @@ return [
| -- helpers (-H) option. Extra helper files can be included. | -- helpers (-H) option. Extra helper files can be included.
| |
*/ */
'include_helpers' => false, 'include_helpers' => false,
'helper_files' => [ 'helper_files' => array(
base_path() . '/vendor/laravel/framework/src/Illuminate/Support/helpers.php', base_path() . '/vendor/laravel/framework/src/Illuminate/Support/helpers.php',
], ),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -83,11 +110,28 @@ return [
| Define in which directories the ide-helper:models command should look | Define in which directories the ide-helper:models command should look
| for models. | for models.
| |
| glob patterns are supported to easier reach models in sub-directories,
| e.g. `app/Services/* /Models` (without the space)
|
*/ */
'model_locations' => [
'app/Models',
],
'model_locations' => array(
'app/Models',
'modules/*/Models'
),
/*
|--------------------------------------------------------------------------
| Models to ignore
|--------------------------------------------------------------------------
|
| Define which models should be ignored.
|
*/
'ignored_models' => array(
),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -97,23 +141,13 @@ return [
| These implementations are not really extended, but called with magic functions | These implementations are not really extended, but called with magic functions
| |
*/ */
'extra' => [
'Eloquent' => ['Illuminate\Database\Eloquent\Builder', 'Illuminate\Database\Query\Builder'],
'Session' => ['Illuminate\Session\Store'],
],
'magic' => [ 'extra' => array(
'Log' => [ 'Eloquent' => array('Illuminate\Database\Eloquent\Builder', 'Illuminate\Database\Query\Builder'),
'debug' => 'Monolog\Logger::addDebug', 'Session' => array('Illuminate\Session\Store'),
'info' => 'Monolog\Logger::addInfo', ),
'notice' => 'Monolog\Logger::addNotice',
'warning' => 'Monolog\Logger::addWarning', 'magic' => array(),
'error' => 'Monolog\Logger::addError',
'critical' => 'Monolog\Logger::addCritical',
'alert' => 'Monolog\Logger::addAlert',
'emergency' => 'Monolog\Logger::addEmergency',
],
],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -124,9 +158,10 @@ return [
| are detected by the helpers, others can be listed below. | are detected by the helpers, others can be listed below.
| |
*/ */
'interfaces' => [
], 'interfaces' => array(
),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -154,9 +189,9 @@ return [
| ), | ),
| |
*/ */
'custom_db_types' => [ 'custom_db_types' => array(
], ),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -171,13 +206,13 @@ return [
| |
| For example, normally you would see this: | For example, normally you would see this:
| |
| * @property \Carbon\Carbon $created_at | * @property \Illuminate\Support\Carbon $created_at
| * @property \Carbon\Carbon $updated_at | * @property \Illuminate\Support\Carbon $updated_at
| |
| With this enabled, the properties will be this: | With this enabled, the properties will be this:
| |
| * @property \Carbon\Carbon $createdAt | * @property \Illuminate\Support\Carbon $createdAt
| * @property \Carbon\Carbon $updatedAt | * @property \Illuminate\Support\Carbon $updatedAt
| |
| Note, it is currently an all-or-nothing option. | Note, it is currently an all-or-nothing option.
| |
@ -192,10 +227,10 @@ return [
| Cast the given "real type" to the given "type". | Cast the given "real type" to the given "type".
| |
*/ */
'type_overrides' => [ 'type_overrides' => array(
'integer' => 'int', 'integer' => 'int',
'boolean' => 'bool', 'boolean' => 'bool',
], ),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -208,4 +243,4 @@ return [
*/ */
'include_class_docblocks' => false, 'include_class_docblocks' => false,
]; );