8 changed files with 38 additions and 23 deletions
-
7app/Entities/Partners/Vendor.php
-
10app/Http/Controllers/Partners/VendorsController.php
-
14app/Policies/Partners/VendorPolicy.php
-
6database/factories/VendorFactory.php
-
5database/migrations/2017_11_01_185745_create_vendors_table.php
-
3tests/Feature/ManageVendorsTest.php
-
10tests/Unit/Models/VendorTest.php
-
6tests/Unit/Policies/VendorPolicyTest.php
@ -1,12 +1,16 @@ |
|||
<?php |
|||
|
|||
use App\Entities\Agencies\Agency; |
|||
use App\Entities\Partners\Vendor; |
|||
use Faker\Generator as Faker; |
|||
|
|||
$factory->define(Vendor::class, function (Faker $faker) { |
|||
|
|||
return [ |
|||
'name' => $faker->word, |
|||
'name' => $faker->word, |
|||
'description' => $faker->sentence, |
|||
'owner_id' => function () { |
|||
return factory(Agency::class)->create()->id; |
|||
}, |
|||
]; |
|||
}); |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue