mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-08 02:38:09 +00:00
More code for split and small bug fix in attachment helper.
This commit is contained in:
@@ -26,6 +26,10 @@ class DatabaseSeeder extends Seeder
|
||||
if (App::environment() == 'testing' || App::environment() == 'local') {
|
||||
$this->call('TestDataSeeder');
|
||||
}
|
||||
// set up basic test data (as little as possible):
|
||||
if (App::environment() == 'split') {
|
||||
$this->call('SplitDataSeeder');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
55
database/seeds/SplitDataSeeder.php
Normal file
55
database/seeds/SplitDataSeeder.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* SplitDataSeeder.php
|
||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* SplitDataSeeder.php
|
||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
use FireflyIII\Support\Migration\TestData;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
/**
|
||||
* Class SplitDataSeeder
|
||||
*/
|
||||
class SplitDataSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* TestDataSeeder constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// start by creating all users:
|
||||
// method will return the first user.
|
||||
$user = TestData::createUsers();
|
||||
|
||||
|
||||
// create all kinds of static data:
|
||||
TestData::createAssetAccounts($user);
|
||||
TestData::createBudgets($user);
|
||||
TestData::createCategories($user);
|
||||
TestData::createExpenseAccounts($user);
|
||||
TestData::createRevenueAccounts($user);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user