Skip to content

Commit dc8015a

Browse files
fix incompatible return type (laravel#9909)
* fix incompatible return type * Include full doc block like in the factory example * Update eloquent-factories.md * Update eloquent-factories.md --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent d41ad21 commit dc8015a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

eloquent-factories.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,12 @@ Once you have defined your factories, you may use the static `factory` method pr
9595

9696
The `HasFactory` trait's `factory` method will use conventions to determine the proper factory for the model the trait is assigned to. Specifically, the method will look for a factory in the `Database\Factories` namespace that has a class name matching the model name and is suffixed with `Factory`. If these conventions do not apply to your particular application or factory, you may overwrite the `newFactory` method on your model to return an instance of the model's corresponding factory directly:
9797

98-
use Illuminate\Database\Eloquent\Factories\Factory;
9998
use Database\Factories\Administration\FlightFactory;
10099

101100
/**
102101
* Create a new factory instance for the model.
103102
*/
104-
protected static function newFactory(): Factory
103+
protected static function newFactory()
105104
{
106105
return FlightFactory::new();
107106
}

0 commit comments

Comments
 (0)