Barry vd. Heuvel
8d913089db
Merge pull request #614 from WickedSik/master
...
Allow command to find and use pivot models
2018-05-07 11:17:07 +02:00
Barry vd. Heuvel
e7fa36bdc3
Merge pull request #629 from bedezign/smart-reset
...
"smart-reset": Reset properties/methods, but keep the text
2018-05-07 11:15:59 +02:00
Barry vd. Heuvel
f5275b700a
Merge pull request #632 from JeppeKnockaert/feature/add-morphedByMany-relation
...
Add morphedByMany relationship
2018-05-07 11:13:27 +02:00
Barry vd. Heuvel
046a9bcc77
Merge pull request #647 from eidng8/eidng8-suppress-formatter
...
suppress PHPStorm formatter
2018-05-07 11:10:25 +02:00
Tom Rochette
b1b05b694b
Remove dependecy to Symfony\Component\ClassLoader\ClassMapGenerator and replace it with Composer\Autoload\ClassMapGenerator.
2018-05-03 16:02:16 -04:00
Jackey Cheung
c7b7ebf1b5
suppress PHPStorm formatter
2018-03-21 11:36:02 +08:00
Jeppe Knockaert
17982029f0
Move long one-line array to multiple lines
2018-02-14 12:15:38 +01:00
Jeppe Knockaert
bda5120e9a
Add morphedByMany relationship
2018-02-14 12:06:45 +01:00
Steve Guns
d961482d22
Fixed PHPCS PSR2 issues
2018-02-14 08:59:19 +01:00
Steve Guns
8852b1ca9d
Added "smart-reset": Reset properties/methods, but keep the docBlock text, if any
2018-02-11 19:09:33 +01:00
Jurrien Dokter
7b2786ac2b
Fixing issue #253
2018-01-27 13:01:07 +01:00
Mike
df6b1b6f82
Use Illuminate\Support\Carbon instead of Carbon\Carbon
2017-12-27 17:17:00 -05:00
Markus Fischer
76a1952c41
Keep "null"-ness of column even with model casts
...
A cast in Laravel should only affect the type, but not the database intrinsics whether a column accepts `null` or not.
As an example, consider this table (Postgres syntax):
```sql
CREATE TABLE foo (
some_column jsonb
);
```
This will be generated as: `@property string|null $some_column`
When providing a the following casts on the model:
```php
protected $casts = [
'some_column' => 'array',
];
```
then the generated property changes to: `@property array $some_column`
However the DB still accepts `null`, but this can't be expressed via the casts.
This change will make the null "sticky" and generate: `@property array|null $some_column`
2017-10-28 18:01:18 +02:00
Mariusz
b0abafb8c7
Changed overwriting confirmation message
...
When running php artisan ide-helper:models below message was presented:
"Do you want to overwrite the existing model files? Choose no to write to _ide_helper_models.php instead? (Yes/No): (yes/no) [no]:"
This commit changes message to:
"Do you want to overwrite the existing model files? Choose no to write to _ide_helper_models.php instead? (yes/no) [no]:"
2017-10-11 11:43:16 +01:00
Jan.Weskamp
2b1273c45e
Fix for Laravel 5.5 ( #540 )
...
Command fire method is now handle
2017-07-16 02:24:12 +02:00
Max Matiukhin
25b5576f57
generate methods for the SoftDeletes trait ( #518 )
2017-06-08 12:19:38 +02:00
Michael Tsang
d6d99994c3
return eloquent builder instead of plain database builder from model methods ( #521 )
2017-06-08 12:19:27 +02:00
Neil Farrington
3814fe86ca
Resolve displaying @return types with descriptions ( #491 )
2017-04-14 08:56:19 +02:00
JC Lee
3ab73555d9
Add support for pgsql for boolean types. ( #489 )
2017-04-11 07:31:58 +02:00
Antoine Aflalo
ff3844e4e1
Implements Nullable ( #487 )
...
* Add nullable support
Fixes #407
* Add nullable to setProperty
Better do it like this to still be able to override the base type if wanted
* Cleanup nullableColumns between models iterations
Also rename it to nullableColumns since it contains multiple columns
* Fix formatting
2017-04-08 10:19:23 +02:00
JC Lee
d11bf58084
Fix #480 where tinyint is casts as bool ( #481 )
...
* Fix #480 where tinyint is casts as bool
`tinyint` is classified by bool as doctrine/dbal, but it should not be so in our use case. `tinyint` is better PHPDoc'ed as int. If the user wants bool, he should use Eloquent's `$casts` property to do that.
* Pass PSR-2 check
* Remove comment as requested
2017-04-05 09:45:19 +02:00
Ivan Boldyrev
144a50e8ee
Add disable write magic methods on models ( #466 )
...
* Add desable write magic methods on models
* Fix property name
* Opps commit
* Fix
* Change default parameter of property
2017-03-16 11:46:50 +01:00
arasharg
456853be46
ignore intermediate table models ( #454 )
2017-02-22 08:59:06 +01:00
Django Eijgensteijn
a7fc2ec489
Sorting model docs ( #424 )
2017-01-05 22:20:42 +01:00
ockle
13e65d3885
if model scope method parameters have typehints, add them to the docblock
2016-10-12 21:53:42 +01:00
Bogdan Padalko
71cb03ca6a
Use accessor docblock return type to guess property type
2016-09-06 12:24:42 +03:00
Barry vd. Heuvel
884eaeeb1a
Check if getCasts() exists
...
Fixes #382
2016-08-26 13:37:21 +02:00
Andrew Ellis
6f9b90c204
hotfix for type overrides
...
Oops, looks like I forgot to commit one call to the new method. This is related to #377 .
2016-08-25 18:53:51 -06:00
Andrew Ellis
f3a3533b2d
fixed blank line errors for travis-ci build
2016-08-19 12:37:17 -06:00
Andrew Ellis
f8c6ec95f6
allow a user to define the type overrides
2016-08-19 12:20:34 -06:00
leo108
4b47c0b61c
add support for $casts
2016-08-19 07:35:07 +08:00
Barry vd. Heuvel
8f004f5d6b
Merge pull request #326 from valorin/master
...
Allow for camel case model properties.
2016-07-04 13:45:34 +02:00
Travis Northcutt
dbfcfd66c5
An --> A
2016-06-14 07:23:16 -06:00
Barry vd. Heuvel
3064296216
Use fork of reflection docblock
2016-06-13 21:35:48 +02:00
Barry vd. Heuvel
bae462604e
Add test config, CS rules and fix CS
2016-06-08 21:36:25 +02:00
Tommi Finnilä
4f227d5c57
Add hasManyThrough relationship
2016-05-25 09:28:34 +01:00
Stephen Rees-Carter
a72cd81e5f
Allow for camel case model properties.
2016-03-03 21:36:10 +11:00
Barry vd. Heuvel
f1ebd847aa
Check on actual model, not facade
...
Fixes #311
2016-03-03 09:45:00 +01:00
Barry vd. Heuvel
83597196f9
Prevent double mixin tags
2016-03-03 09:43:49 +01:00
Barry vd. Heuvel
f50470ba49
Add morphOne, fix morphTo
...
Fixes #236 thanks to @boxfrommars
2016-03-02 10:54:41 +01:00
Barry vd. Heuvel
467b5f5b5f
Always add whereColumn
...
Fixes #300 , #325
2016-03-02 10:42:37 +01:00
Barry vd. Heuvel
c213be3d3c
Merge pull request #305 from matiaspub/patch-1
...
Add extend \Eloquent for ide-helper:models command
2016-03-02 10:39:21 +01:00
Barry vd. Heuvel
4b8ba85b34
Merge pull request #315 from icedfish/ignore_exception
...
Ignore abstract class or interface, not throw exception
2016-01-28 09:19:58 +01:00
Yu Bing
3a01e351de
Ignore abstract class or interface, not throw exception
2016-01-28 11:37:08 +08:00
Yu Bing
add34665a8
fix typo
2016-01-28 11:20:48 +08:00
Yu Bing
c77752bb58
recover model's whereXXX() helper function
2016-01-28 11:18:42 +08:00
Sergius
4069863d0c
Add extend \Eloquent for ide-helper:models command
...
It's help author to close many issues! )
Like: #269 , #259 , #248 , #209 , #191 , #74 ,
and https://github.com/laravel/framework/issues/7558 )))
etc. maybe
2016-01-12 15:33:05 +02:00
Kieran
2f83db311f
Fixes #293
2015-12-14 13:29:24 +00:00
miraage
5708012a77
fix(models-command): check for default reflectionparameter value to prevent fail in variadic params
2015-12-06 13:49:27 +03:00
Barry vd. Heuvel
76f09aaa65
Remove magic where
2015-10-19 09:32:38 +02:00