This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** @var \App\ExtendedFactory $factory */ | |
use App\User; | |
use App\Category; | |
use App\Project; | |
use Faker\Generator as Faker; | |
$factory->define(Task::class, function (Faker $faker) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Database\Eloquent\Factory; | |
class ExtendedFactory extends Factory { | |
/** | |
* The registered after creating callbacks. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use App\ExtendedFactory; | |
use Faker\Generator as FakerGenerator; | |
use Illuminate\Database\Eloquent\Factory as EloquentFactory; | |
use Illuminate\Support\ServiceProvider; | |
class AppServiceProvider extends ServiceProvider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use App\Client; | |
use App\Project; | |
use Faker\Generator as Faker; | |
$factory->define(Project::class, function (Faker $faker) { | |
return [ | |
'title' => $faker->sentence, | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** @var \Illuminate\Database\Eloquent\Factory $factory */ | |
use App\Client; | |
use App\Project; | |
use Faker\Generator as Faker; | |
$factory->define(Project::class, function (Faker $faker) { | |
return [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** @var \Illuminate\Database\Eloquent\Factory $factory */ | |
use App\Client; | |
use App\Project; | |
use Faker\Generator as Faker; | |
$factory->define(Project::class, function (Faker $faker) { | |
return [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Database\Eloquent\Relations\HasMany; | |
class Client extends Model | |
{ | |
public function projects() : HasMany |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class Contract extends Model | |
{ | |
public $timestamps = false; |