mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
First set of upgrade to 5.3 stuff.
This commit is contained in:
parent
3aad78e6ef
commit
3d25fd79ca
12
.env.example
12
.env.example
@ -3,14 +3,17 @@ APP_DEBUG=false
|
||||
APP_FORCE_SSL=false
|
||||
APP_FORCE_ROOT=
|
||||
APP_KEY=SomeRandomStringOf32CharsExactly
|
||||
LOG_LEVEL=warning
|
||||
APP_LOG_LEVEL=warning
|
||||
APP_URL=http://localhost
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=localhost
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=homestead
|
||||
DB_USERNAME=homestead
|
||||
DB_PASSWORD=secret
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
SESSION_DRIVER=file
|
||||
QUEUE_DRIVER=sync
|
||||
@ -22,7 +25,7 @@ COOKIE_SECURE=false
|
||||
DEFAULT_CURRENCY=EUR
|
||||
DEFAULT_LANGUAGE=en_US
|
||||
|
||||
REDIS_HOST=localhost
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
@ -42,3 +45,6 @@ SHOW_DEMO_WARNING=false
|
||||
|
||||
ANALYTICS_ID=
|
||||
SITE_OWNER=mail@example.com
|
||||
PUSHER_KEY=
|
||||
PUSHER_SECRET=
|
||||
PUSHER_APP_ID=
|
||||
|
38
.env.testing
38
.env.testing
@ -1,38 +0,0 @@
|
||||
APP_ENV=testing
|
||||
APP_DEBUG=true
|
||||
APP_FORCE_SSL=false
|
||||
APP_KEY=SomeRandomStringOf32CharsExactly
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=sqlite
|
||||
DB_HOST=localhost
|
||||
DB_DATABASE=homestead
|
||||
DB_USERNAME=homestead
|
||||
DB_PASSWORD=secret
|
||||
|
||||
CACHE_DRIVER=array
|
||||
SESSION_DRIVER=array
|
||||
QUEUE_DRIVER=array
|
||||
|
||||
DEFAULT_CURRENCY=EUR
|
||||
DEFAULT_LANGUAGE=en_US
|
||||
|
||||
REDIS_HOST=localhost
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_DRIVER=log
|
||||
MAIL_HOST=mailtrap.io
|
||||
MAIL_PORT=2525
|
||||
MAIL_FROM=your_address_here@example.com
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
|
||||
SHOW_INCOMPLETE_TRANSLATIONS=false
|
||||
|
||||
ANALYTICS_ID=abcde
|
||||
RUNCLEANUP=false
|
||||
SITE_OWNER=your_address_here@example.com
|
||||
|
||||
BLOCKED_DOMAINS=
|
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -1,3 +1,3 @@
|
||||
* text=auto
|
||||
*.css linguist-vendored
|
||||
*.less linguist-vendored
|
||||
*.scss linguist-vendored
|
||||
|
6
.gitignore
vendored
Normal file → Executable file
6
.gitignore
vendored
Normal file → Executable file
@ -1,5 +1,9 @@
|
||||
/vendor
|
||||
/node_modules
|
||||
/public/storage
|
||||
/vendor
|
||||
/.idea
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
.env
|
||||
_development
|
||||
.env.local
|
||||
|
32
app/Http/Controllers/Auth/ForgotPasswordController.php
Executable file
32
app/Http/Controllers/Auth/ForgotPasswordController.php
Executable file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Auth;
|
||||
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
||||
|
||||
class ForgotPasswordController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling password reset emails and
|
||||
| includes a trait which assists in sending these notifications from
|
||||
| your application to your users. Feel free to explore this trait.
|
||||
|
|
||||
*/
|
||||
|
||||
use SendsPasswordResetEmails;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest');
|
||||
}
|
||||
}
|
39
app/Http/Controllers/Auth/LoginController.php
Executable file
39
app/Http/Controllers/Auth/LoginController.php
Executable file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Auth;
|
||||
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
|
||||
class LoginController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Login Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller handles authenticating users for the application and
|
||||
| redirecting them to your home screen. The controller uses a trait
|
||||
| to conveniently provide its functionality to your applications.
|
||||
|
|
||||
*/
|
||||
|
||||
use AuthenticatesUsers;
|
||||
|
||||
/**
|
||||
* Where to redirect users after login / registration.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest', ['except' => 'logout']);
|
||||
}
|
||||
}
|
71
app/Http/Controllers/Auth/RegisterController.php
Executable file
71
app/Http/Controllers/Auth/RegisterController.php
Executable file
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Auth;
|
||||
|
||||
use FireflyIII\User;
|
||||
use Validator;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||
|
||||
class RegisterController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller handles the registration of new users as well as their
|
||||
| validation and creation. By default this controller uses a trait to
|
||||
| provide this functionality without requiring any additional code.
|
||||
|
|
||||
*/
|
||||
|
||||
use RegistersUsers;
|
||||
|
||||
/**
|
||||
* Where to redirect users after login / registration.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a validator for an incoming registration request.
|
||||
*
|
||||
* @param array $data
|
||||
* @return \Illuminate\Contracts\Validation\Validator
|
||||
*/
|
||||
protected function validator(array $data)
|
||||
{
|
||||
return Validator::make($data, [
|
||||
'name' => 'required|max:255',
|
||||
'email' => 'required|email|max:255|unique:users',
|
||||
'password' => 'required|min:6|confirmed',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new user instance after a valid registration.
|
||||
*
|
||||
* @param array $data
|
||||
* @return User
|
||||
*/
|
||||
protected function create(array $data)
|
||||
{
|
||||
return User::create([
|
||||
'name' => $data['name'],
|
||||
'email' => $data['email'],
|
||||
'password' => bcrypt($data['password']),
|
||||
]);
|
||||
}
|
||||
}
|
32
app/Http/Controllers/Auth/ResetPasswordController.php
Executable file
32
app/Http/Controllers/Auth/ResetPasswordController.php
Executable file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Auth;
|
||||
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||
|
||||
class ResetPasswordController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling password reset requests
|
||||
| and uses a simple trait to include this behavior. You're free to
|
||||
| explore this trait and override any methods you wish to tweak.
|
||||
|
|
||||
*/
|
||||
|
||||
use ResetsPasswords;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest');
|
||||
}
|
||||
}
|
26
app/Providers/BroadcastServiceProvider.php
Executable file
26
app/Providers/BroadcastServiceProvider.php
Executable file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace FireflyIII\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
|
||||
class BroadcastServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
Broadcast::routes();
|
||||
|
||||
/*
|
||||
* Authenticate the user's personal channel...
|
||||
*/
|
||||
Broadcast::channel('App.User.*', function ($user, $userId) {
|
||||
return (int) $user->id === (int) $userId;
|
||||
});
|
||||
}
|
||||
}
|
42
app/User.php
Normal file → Executable file
42
app/User.php
Normal file → Executable file
@ -9,57 +9,23 @@
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
|
||||
namespace FireflyIII;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
/**
|
||||
* Class User
|
||||
*
|
||||
* @package FireflyIII
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property string $email
|
||||
* @property string $password
|
||||
* @property string $remember_token
|
||||
* @property string $reset
|
||||
* @property bool $activated
|
||||
* @property bool $isAdmin
|
||||
* @property bool $has2FA
|
||||
* @property boolean $blocked
|
||||
* @property string $blocked_code
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Account[] $accounts
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Attachment[] $attachments
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Tag[] $tags
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Bill[] $bills
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Budget[] $budgets
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Category[] $categories
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Preference[] $preferences
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\TransactionJournal[] $transactionjournals
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Role[] $roles
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\RuleGroup[] $ruleGroups
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Rule[] $rules
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\ExportJob[] $exportjobs
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\User whereId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\User whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\User whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\User whereEmail($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\User wherePassword($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\User whereRememberToken($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\User whereReset($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\User whereBlocked($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\User whereBlockedCode($value)
|
||||
* @mixin \Eloquent
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\ImportJob[] $importjobs
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\PiggyBank[] $piggyBanks
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Transaction[] $transactions
|
||||
*/
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use Notifiable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
@ -67,6 +33,7 @@ class User extends Authenticatable
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = ['email', 'password', 'blocked', 'blocked_code'];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
@ -241,4 +208,5 @@ class User extends Authenticatable
|
||||
return $this->hasManyThrough('FireflyIII\Models\Transaction', 'FireflyIII\Models\TransactionJournal');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
0
bootstrap/app.php
Normal file → Executable file
0
bootstrap/app.php
Normal file → Executable file
0
bootstrap/autoload.php
Normal file → Executable file
0
bootstrap/autoload.php
Normal file → Executable file
0
bootstrap/cache/.gitignore
vendored
Normal file → Executable file
0
bootstrap/cache/.gitignore
vendored
Normal file → Executable file
48
composer.json
Normal file → Executable file
48
composer.json
Normal file → Executable file
@ -26,26 +26,26 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"laravel/framework": "5.2.*",
|
||||
"davejamesmiller/laravel-breadcrumbs": "~3.0",
|
||||
"watson/validating": "~2.0",
|
||||
"doctrine/dbal": "~2.5",
|
||||
"league/commonmark": "~0.7",
|
||||
"rcrowe/twigbridge": "~0.9",
|
||||
"league/csv": "^7.1",
|
||||
"laravelcollective/html": "^5.2",
|
||||
"php": ">=7.0.0",
|
||||
"laravel/framework": "5.3.*",
|
||||
"davejamesmiller/laravel-breadcrumbs": "^3.0",
|
||||
"watson/validating": "^3.0",
|
||||
"doctrine/dbal": "^2.5",
|
||||
"league/commonmark": "^0.15.0",
|
||||
"rcrowe/twigbridge": "^0.9.3",
|
||||
"league/csv": "^8.1",
|
||||
"laravelcollective/html": "^5.3",
|
||||
"rmccue/requests": "^1.6",
|
||||
"pragmarx/google2fa": "^0.7.1"
|
||||
"pragmarx/google2fa": "^1.0",
|
||||
"barryvdh/laravel-debugbar": "^2.2",
|
||||
"barryvdh/laravel-ide-helper": "^2.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"fzaninotto/faker": "~1.4",
|
||||
"mockery/mockery": "dev-master",
|
||||
"phpunit/phpunit": "~4.0",
|
||||
"symfony/css-selector": "2.8.*|3.0.*",
|
||||
"symfony/dom-crawler": "2.8.*|3.0.*",
|
||||
"barryvdh/laravel-debugbar": "@stable",
|
||||
"barryvdh/laravel-ide-helper": "~2.0",
|
||||
"hamcrest/hamcrest-php": "^2.0@dev"
|
||||
"mockery/mockery": "0.9.*",
|
||||
"phpunit/phpunit": "~5.0",
|
||||
"symfony/css-selector": "3.1.*",
|
||||
"symfony/dom-crawler": "3.1.*"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
@ -62,25 +62,19 @@
|
||||
},
|
||||
"scripts": {
|
||||
"post-root-package-install": [
|
||||
"php -r \"copy('.env.example', '.env');\""
|
||||
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||
],
|
||||
"post-create-project-cmd": [
|
||||
"php artisan key:generate"
|
||||
],
|
||||
"post-install-cmd": [
|
||||
"php artisan cache:clear",
|
||||
"php artisan clear-compiled",
|
||||
"php artisan optimize",
|
||||
"php artisan firefly:upgrade-instructions"
|
||||
],
|
||||
"pre-update-cmd": [
|
||||
"php artisan clear-compiled"
|
||||
"Illuminate\\Foundation\\ComposerScripts::postInstall",
|
||||
"php artisan optimize"
|
||||
],
|
||||
"post-update-cmd": [
|
||||
"php artisan cache:clear",
|
||||
"php artisan optimize",
|
||||
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
|
||||
"php artisan firefly:upgrade-instructions",
|
||||
"php artisan firefly:verify"
|
||||
"php artisan optimize"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
|
1311
composer.lock
generated
1311
composer.lock
generated
File diff suppressed because it is too large
Load Diff
36
config/app.php
Normal file → Executable file
36
config/app.php
Normal file → Executable file
@ -3,6 +3,18 @@ declare(strict_types = 1);
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value is the name of your application. This value is used when the
|
||||
| framework needs to place the application's name in a notification or
|
||||
| any other location as required by the application or its packages.
|
||||
*/
|
||||
|
||||
'name' => 'Firefly III',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Environment
|
||||
@ -40,7 +52,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'url' => 'http://localhost',
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@ -109,8 +121,9 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'log' => env('APP_LOG', 'daily'),
|
||||
'log-level' => env('LOG_LEVEL', 'info'),
|
||||
'log' => env('APP_LOG', 'daily'),
|
||||
|
||||
'log_level' => env('APP_LOG_LEVEL', 'info'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@ -140,6 +153,7 @@ return [
|
||||
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
|
||||
Illuminate\Hashing\HashServiceProvider::class,
|
||||
Illuminate\Mail\MailServiceProvider::class,
|
||||
Illuminate\Notifications\NotificationServiceProvider::class,
|
||||
Illuminate\Pagination\PaginationServiceProvider::class,
|
||||
Illuminate\Pipeline\PipelineServiceProvider::class,
|
||||
Illuminate\Queue\QueueServiceProvider::class,
|
||||
@ -157,22 +171,22 @@ return [
|
||||
*/
|
||||
FireflyIII\Providers\AppServiceProvider::class,
|
||||
FireflyIII\Providers\AuthServiceProvider::class,
|
||||
// FireflyIII\Providers\BroadcastServiceProvider::class,
|
||||
FireflyIII\Providers\EventServiceProvider::class,
|
||||
FireflyIII\Providers\RouteServiceProvider::class,
|
||||
FireflyIII\Providers\FireflyServiceProvider::class,
|
||||
|
||||
|
||||
// own stuff:
|
||||
// Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
|
||||
// Barryvdh\Debugbar\ServiceProvider::class,
|
||||
'DaveJamesMiller\Breadcrumbs\ServiceProvider',
|
||||
'TwigBridge\ServiceProvider',
|
||||
//Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
|
||||
//Barryvdh\Debugbar\ServiceProvider::class,
|
||||
DaveJamesMiller\Breadcrumbs\ServiceProvider::class,
|
||||
TwigBridge\ServiceProvider::class,
|
||||
'PragmaRX\Google2FA\Vendor\Laravel\ServiceProvider',
|
||||
|
||||
|
||||
/*
|
||||
* More service providers.
|
||||
*/
|
||||
* More service providers.
|
||||
*/
|
||||
FireflyIII\Providers\CrudServiceProvider::class,
|
||||
FireflyIII\Providers\AccountServiceProvider::class,
|
||||
FireflyIII\Providers\AttachmentServiceProvider::class,
|
||||
@ -219,6 +233,7 @@ return [
|
||||
'Lang' => Illuminate\Support\Facades\Lang::class,
|
||||
'Log' => Illuminate\Support\Facades\Log::class,
|
||||
'Mail' => Illuminate\Support\Facades\Mail::class,
|
||||
'Notification' => Illuminate\Support\Facades\Notification::class,
|
||||
'Password' => Illuminate\Support\Facades\Password::class,
|
||||
'Queue' => Illuminate\Support\Facades\Queue::class,
|
||||
'Redirect' => Illuminate\Support\Facades\Redirect::class,
|
||||
@ -246,6 +261,7 @@ return [
|
||||
'Input' => 'Illuminate\Support\Facades\Input',
|
||||
'Google2FA' => 'PragmaRX\Google2FA\Vendor\Laravel\Facade',
|
||||
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
|
89
config/auth.php
Normal file → Executable file
89
config/auth.php
Normal file → Executable file
@ -1,38 +1,105 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
|
||||
return [
|
||||
|
||||
'defaults' => [
|
||||
'guard' => 'web',
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Defaults
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default authentication "guard" and password
|
||||
| reset options for your application. You may change these defaults
|
||||
| as required, but they're a perfect start for most applications.
|
||||
|
|
||||
*/
|
||||
|
||||
'defaults' => [
|
||||
'guard' => 'web',
|
||||
'passwords' => 'users',
|
||||
],
|
||||
'guards' => [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Guards
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Next, you may define every authentication guard for your application.
|
||||
| Of course, a great default configuration has been defined for you
|
||||
| here which uses session storage and the Eloquent user provider.
|
||||
|
|
||||
| All authentication drivers have a user provider. This defines how the
|
||||
| users are actually retrieved out of your database or other storage
|
||||
| mechanisms used by this application to persist your user's data.
|
||||
|
|
||||
| Supported: "session", "token"
|
||||
|
|
||||
*/
|
||||
|
||||
'guards' => [
|
||||
'web' => [
|
||||
'driver' => 'session',
|
||||
'driver' => 'session',
|
||||
'provider' => 'users',
|
||||
],
|
||||
|
||||
'api' => [
|
||||
'driver' => 'token',
|
||||
'driver' => 'token',
|
||||
'provider' => 'users',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| User Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| All authentication drivers have a user provider. This defines how the
|
||||
| users are actually retrieved out of your database or other storage
|
||||
| mechanisms used by this application to persist your user's data.
|
||||
|
|
||||
| If you have multiple user tables or models you may configure multiple
|
||||
| sources which represent each model / table. These sources may then
|
||||
| be assigned to any extra authentication guards you have defined.
|
||||
|
|
||||
| Supported: "database", "eloquent"
|
||||
|
|
||||
*/
|
||||
|
||||
'providers' => [
|
||||
'users' => [
|
||||
'driver' => 'eloquent',
|
||||
'model' => FireflyIII\User::class,
|
||||
'model' => FireflyIII\User::class,
|
||||
],
|
||||
|
||||
// 'users' => [
|
||||
// 'driver' => 'database',
|
||||
// 'table' => 'users',
|
||||
// ],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Resetting Passwords
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may set the options for resetting passwords including the view
|
||||
| that is your password reset e-mail. You may also set the name of the
|
||||
| table that maintains all of the reset tokens for your application.
|
||||
|
|
||||
| You may specify multiple password reset configurations if you have more
|
||||
| than one user table or model in the application and you want to have
|
||||
| separate password reset settings based on the specific user types.
|
||||
|
|
||||
| The expire time is the number of minutes that the reset token should be
|
||||
| considered valid. This security feature keeps tokens short-lived so
|
||||
| they have less time to be guessed. You may change this as needed.
|
||||
|
|
||||
*/
|
||||
|
||||
'passwords' => [
|
||||
'users' => [
|
||||
'provider' => 'users',
|
||||
'email' => 'emails.password',
|
||||
'table' => 'password_resets',
|
||||
'expire' => 60,
|
||||
'table' => 'password_resets',
|
||||
'expire' => 60,
|
||||
],
|
||||
],
|
||||
|
||||
|
20
config/broadcasting.php
Normal file → Executable file
20
config/broadcasting.php
Normal file → Executable file
@ -1,6 +1,4 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
|
||||
return [
|
||||
|
||||
@ -13,9 +11,11 @@ return [
|
||||
| framework when an event needs to be broadcast. You may set this to
|
||||
| any of the connections defined in the "connections" array below.
|
||||
|
|
||||
| Supported: "pusher", "redis", "log", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('BROADCAST_DRIVER', 'pusher'),
|
||||
'default' => env('BROADCAST_DRIVER', 'null'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@ -31,17 +31,17 @@ return [
|
||||
'connections' => [
|
||||
|
||||
'pusher' => [
|
||||
'driver' => 'pusher',
|
||||
'key' => env('PUSHER_KEY'),
|
||||
'secret' => env('PUSHER_SECRET'),
|
||||
'app_id' => env('PUSHER_APP_ID'),
|
||||
'driver' => 'pusher',
|
||||
'key' => env('PUSHER_KEY'),
|
||||
'secret' => env('PUSHER_SECRET'),
|
||||
'app_id' => env('PUSHER_APP_ID'),
|
||||
'options' => [
|
||||
//
|
||||
],
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
],
|
||||
|
||||
@ -49,6 +49,10 @@ return [
|
||||
'driver' => 'log',
|
||||
],
|
||||
|
||||
'null' => [
|
||||
'driver' => 'null',
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
|
26
config/cache.php
Normal file → Executable file
26
config/cache.php
Normal file → Executable file
@ -1,6 +1,4 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
|
||||
return [
|
||||
|
||||
@ -13,6 +11,8 @@ return [
|
||||
| using this caching library. This connection is used when another is
|
||||
| not explicitly specified when executing a given caching function.
|
||||
|
|
||||
| Supported: "apc", "array", "database", "file", "memcached", "redis"
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('CACHE_DRIVER', 'file'),
|
||||
@ -39,27 +39,37 @@ return [
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'cache',
|
||||
'driver' => 'database',
|
||||
'table' => 'cache',
|
||||
'connection' => null,
|
||||
],
|
||||
|
||||
'file' => [
|
||||
'driver' => 'file',
|
||||
'path' => storage_path('framework/cache'),
|
||||
'path' => storage_path('framework/cache'),
|
||||
],
|
||||
|
||||
'memcached' => [
|
||||
'driver' => 'memcached',
|
||||
'driver' => 'memcached',
|
||||
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
||||
'sasl' => [
|
||||
env('MEMCACHED_USERNAME'),
|
||||
env('MEMCACHED_PASSWORD'),
|
||||
],
|
||||
'options' => [
|
||||
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||
],
|
||||
'servers' => [
|
||||
[
|
||||
'host' => '127.0.0.1', 'port' => 11211, 'weight' => 100,
|
||||
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
||||
'port' => env('MEMCACHED_PORT', 11211),
|
||||
'weight' => 100,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
],
|
||||
|
||||
|
2
config/compile.php
Normal file → Executable file
2
config/compile.php
Normal file → Executable file
@ -1,6 +1,4 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
|
||||
return [
|
||||
|
||||
|
54
config/database.php
Normal file → Executable file
54
config/database.php
Normal file → Executable file
@ -1,6 +1,4 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
|
||||
return [
|
||||
|
||||
@ -15,7 +13,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'fetch' => PDO::FETCH_CLASS,
|
||||
'fetch' => PDO::FETCH_OBJ,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@ -49,42 +47,36 @@ return [
|
||||
'connections' => [
|
||||
|
||||
'sqlite' => [
|
||||
'driver' => 'sqlite',
|
||||
'database' => storage_path('database') . '/testing.db',
|
||||
'prefix' => '',
|
||||
'driver' => 'sqlite',
|
||||
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||
'prefix' => '',
|
||||
],
|
||||
|
||||
'mysql' => [
|
||||
'driver' => 'mysql',
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'driver' => 'mysql',
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'port' => env('DB_PORT', '3306'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'collation' => 'utf8_unicode_ci',
|
||||
'prefix' => '',
|
||||
'strict' => false,
|
||||
'prefix' => '',
|
||||
'strict' => true,
|
||||
'engine' => null,
|
||||
],
|
||||
|
||||
'pgsql' => [
|
||||
'driver' => 'pgsql',
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'driver' => 'pgsql',
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'port' => env('DB_PORT', '5432'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'schema' => 'public',
|
||||
],
|
||||
|
||||
'sqlsrv' => [
|
||||
'driver' => 'sqlsrv',
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'schema' => 'public',
|
||||
'sslmode' => 'prefer',
|
||||
],
|
||||
|
||||
],
|
||||
@ -118,9 +110,9 @@ return [
|
||||
'cluster' => false,
|
||||
|
||||
'default' => [
|
||||
'host' => env('REDIS_HOST', 'localhost'),
|
||||
'host' => env('REDIS_HOST', 'localhost'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', 6379),
|
||||
'port' => env('REDIS_PORT', 6379),
|
||||
'database' => 0,
|
||||
],
|
||||
|
||||
|
@ -1,80 +0,0 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
|
||||
/**
|
||||
* This file is part of Entrust,
|
||||
* a role & permission management solution for Laravel.
|
||||
*
|
||||
* @license MIT
|
||||
* @package Zizaco\Entrust
|
||||
*/
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Entrust Role Model
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the Role model used by Entrust to create correct relations. Update
|
||||
| the role if it is in a different namespace.
|
||||
|
|
||||
*/
|
||||
'role' => 'FireflyIII\Models\Role',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Entrust Roles Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the roles table used by Entrust to save roles to the database.
|
||||
|
|
||||
*/
|
||||
'roles_table' => 'roles',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Entrust Permission Model
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the Permission model used by Entrust to create correct relations.
|
||||
| Update the permission if it is in a different namespace.
|
||||
|
|
||||
*/
|
||||
'permission' => 'FireflyIII\Models\Permission',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Entrust Permissions Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the permissions table used by Entrust to save permissions to the
|
||||
| database.
|
||||
|
|
||||
*/
|
||||
'permissions_table' => 'permissions',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Entrust permission_role Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the permission_role table used by Entrust to save relationship
|
||||
| between permissions and roles to the database.
|
||||
|
|
||||
*/
|
||||
'permission_role_table' => 'permission_role',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Entrust role_user Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the role_user table used by Entrust to save assigned roles to the
|
||||
| database.
|
||||
|
|
||||
*/
|
||||
'role_user_table' => 'role_user',
|
||||
|
||||
];
|
24
config/filesystems.php
Normal file → Executable file
24
config/filesystems.php
Normal file → Executable file
@ -1,6 +1,4 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
|
||||
return [
|
||||
|
||||
@ -45,7 +43,7 @@ return [
|
||||
|
||||
'disks' => [
|
||||
|
||||
'local' => [
|
||||
'local' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app'),
|
||||
],
|
||||
@ -63,11 +61,11 @@ return [
|
||||
'root' => storage_path('database'),
|
||||
],
|
||||
|
||||
'ftp' => [
|
||||
'driver' => 'ftp',
|
||||
'host' => 'ftp.example.com',
|
||||
'username' => 'your-username',
|
||||
'password' => 'your-password',
|
||||
|
||||
'public' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app/public'),
|
||||
'visibility' => 'public',
|
||||
],
|
||||
|
||||
's3' => [
|
||||
@ -78,16 +76,6 @@ return [
|
||||
'bucket' => 'your-bucket',
|
||||
],
|
||||
|
||||
'rackspace' => [
|
||||
'driver' => 'rackspace',
|
||||
'username' => 'your-username',
|
||||
'key' => 'your-key',
|
||||
'container' => 'your-container',
|
||||
'endpoint' => 'https://identity.api.rackspacecloud.com/v2.0/',
|
||||
'region' => 'IAD',
|
||||
'url_type' => 'publicURL',
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
|
8
config/mail.php
Normal file → Executable file
8
config/mail.php
Normal file → Executable file
@ -1,6 +1,4 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
|
||||
return [
|
||||
|
||||
@ -13,7 +11,8 @@ return [
|
||||
| sending of e-mail. You may specify which one you're using throughout
|
||||
| your application here. By default, Laravel is setup for SMTP mail.
|
||||
|
|
||||
| Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill", "ses", "log"
|
||||
| Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill",
|
||||
| "ses", "sparkpost", "log"
|
||||
|
|
||||
*/
|
||||
|
||||
@ -56,7 +55,8 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'from' => ['address' => env('MAIL_FROM', null), 'name' => 'Firefly III Mailer'],
|
||||
'from' => ['address' => env('MAIL_FROM', 'noreply@example.com'), 'name' => 'Firefly III Mailer'],
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
29
config/queue.php
Normal file → Executable file
29
config/queue.php
Normal file → Executable file
@ -1,6 +1,4 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
|
||||
return [
|
||||
|
||||
@ -13,8 +11,7 @@ return [
|
||||
| API, giving you convenient access to each back-end using the same
|
||||
| syntax for each one. Here you may set the default queue driver.
|
||||
|
|
||||
| Supported: "null", "sync", "database", "beanstalkd",
|
||||
| "sqs", "redis"
|
||||
| Supported: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
@ -39,32 +36,32 @@ return [
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'jobs',
|
||||
'queue' => 'default',
|
||||
'expire' => 60,
|
||||
'table' => 'jobs',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
],
|
||||
|
||||
'beanstalkd' => [
|
||||
'driver' => 'beanstalkd',
|
||||
'host' => 'localhost',
|
||||
'queue' => 'default',
|
||||
'ttr' => 60,
|
||||
'host' => 'localhost',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
],
|
||||
|
||||
'sqs' => [
|
||||
'driver' => 'sqs',
|
||||
'key' => 'your-public-key',
|
||||
'key' => 'your-public-key',
|
||||
'secret' => 'your-secret-key',
|
||||
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
|
||||
'queue' => 'your-queue-name',
|
||||
'queue' => 'your-queue-name',
|
||||
'region' => 'us-east-1',
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
'queue' => 'default',
|
||||
'expire' => 60,
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
],
|
||||
|
||||
],
|
||||
@ -82,7 +79,7 @@ return [
|
||||
|
||||
'failed' => [
|
||||
'database' => env('DB_CONNECTION', 'mysql'),
|
||||
'table' => 'failed_jobs',
|
||||
'table' => 'failed_jobs',
|
||||
],
|
||||
|
||||
];
|
||||
|
18
config/services.php
Normal file → Executable file
18
config/services.php
Normal file → Executable file
@ -1,6 +1,4 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
|
||||
return [
|
||||
|
||||
@ -10,7 +8,7 @@ return [
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is for storing the credentials for third party services such
|
||||
| as Stripe, Mailgun, Mandrill, and others. This file provides a sane
|
||||
| as Stripe, Mailgun, SparkPost and others. This file provides a sane
|
||||
| default location for this type of information, allowing packages
|
||||
| to have a conventional place to find your various credentials.
|
||||
|
|
||||
@ -21,19 +19,19 @@ return [
|
||||
'secret' => env('MAILGUN_SECRET'),
|
||||
],
|
||||
|
||||
'mandrill' => [
|
||||
'secret' => env('MANDRILL_SECRET'),
|
||||
],
|
||||
|
||||
'ses' => [
|
||||
'key' => env('SES_KEY'),
|
||||
'key' => env('SES_KEY'),
|
||||
'secret' => env('SES_SECRET'),
|
||||
'region' => 'us-east-1',
|
||||
],
|
||||
|
||||
'sparkpost' => [
|
||||
'secret' => env('SPARKPOST_SECRET'),
|
||||
],
|
||||
|
||||
'stripe' => [
|
||||
'model' => FireflyIII\User::class,
|
||||
'key' => env('STRIPE_KEY'),
|
||||
'model' => FireflyIII\User::class,
|
||||
'key' => env('STRIPE_KEY'),
|
||||
'secret' => env('STRIPE_SECRET'),
|
||||
],
|
||||
|
||||
|
28
config/session.php
Normal file → Executable file
28
config/session.php
Normal file → Executable file
@ -87,6 +87,19 @@ return [
|
||||
|
||||
'table' => 'sessions',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cache Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "apc" or "memcached" session drivers, you may specify a
|
||||
| cache store that should be used for these sessions. This value must
|
||||
| correspond with one of the application's configured cache stores.
|
||||
|
|
||||
*/
|
||||
|
||||
'store' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Sweeping Lottery
|
||||
@ -150,6 +163,19 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'secure' => env('COOKIE_SECURE', false),
|
||||
'secure' => env('COOKIE_SECURE', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| HTTP Access Only
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Setting this value to true will prevent JavaScript from accessing the
|
||||
| value of the cookie and the cookie will only be accessible through
|
||||
| the HTTP protocol. You are free to modify this option if needed.
|
||||
|
|
||||
*/
|
||||
|
||||
'http_only' => !env('COOKIE_SECURE', false),
|
||||
|
||||
];
|
||||
|
@ -1,8 +1,19 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
/**
|
||||
* This file is part of the TwigBridge package.
|
||||
*
|
||||
* @copyright Robert Crowe <hello@vivalacrowe.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Configuration options for Twig.
|
||||
*/
|
||||
return [
|
||||
|
||||
'twig' => [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@ -27,9 +38,10 @@ return [
|
||||
// When set to true, the generated templates have a __toString() method
|
||||
// that you can use to display the generated nodes.
|
||||
// default: false
|
||||
'debug' => config('app.debug', false),
|
||||
'debug' => env('APP_DEBUG', false),
|
||||
|
||||
// The charset used by the templates.
|
||||
// default: utf-8
|
||||
'charset' => 'utf-8',
|
||||
|
||||
// The base template class to use for generated templates.
|
||||
@ -53,8 +65,8 @@ return [
|
||||
'strict_variables' => false,
|
||||
|
||||
// If set to true, auto-escaping will be enabled by default for all templates.
|
||||
// default: true
|
||||
'autoescape' => true,
|
||||
// default: 'html'
|
||||
'autoescape' => 'html',
|
||||
|
||||
// A flag that indicates which optimizations to apply
|
||||
// (default to -1 -- all optimizations are enabled; set it to 0 to disable)
|
||||
@ -98,8 +110,9 @@ return [
|
||||
'TwigBridge\Extension\Laravel\Str',
|
||||
'TwigBridge\Extension\Laravel\Translator',
|
||||
'TwigBridge\Extension\Laravel\Url',
|
||||
// 'TwigBridge\Extension\Laravel\Gate',
|
||||
|
||||
// 'TwigBridge\Extension\Laravel\Form',
|
||||
// 'TwigBridge\Extension\Laravel\Form',
|
||||
// 'TwigBridge\Extension\Laravel\Html',
|
||||
// 'TwigBridge\Extension\Laravel\Legacy\Facades',
|
||||
],
|
||||
@ -157,6 +170,7 @@ return [
|
||||
],
|
||||
],
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Functions
|
||||
@ -220,6 +234,8 @@ return [
|
||||
| </code>
|
||||
|
|
||||
*/
|
||||
'filters' => [],
|
||||
'filters' => [
|
||||
'get' => 'data_get',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
0
config/view.php
Normal file → Executable file
0
config/view.php
Normal file → Executable file
0
database/.gitignore
vendored
Normal file → Executable file
0
database/.gitignore
vendored
Normal file → Executable file
33
database/factories/ModelFactory.php
Normal file → Executable file
33
database/factories/ModelFactory.php
Normal file → Executable file
@ -1,24 +1,23 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Model Factories
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define all of your model factories. Model factories give
|
||||
| you a convenient way to create models for testing and seeding your
|
||||
| database. Just tell the factory how a default model should look.
|
||||
|
|
||||
*/
|
||||
|
||||
$factory->define(FireflyIII\User::class, function (Faker\Generator $faker) {
|
||||
static $password;
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\User::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'name' => $faker->name,
|
||||
'email' => $faker->email,
|
||||
'password' => bcrypt(str_random(10)),
|
||||
'name' => $faker->name,
|
||||
'email' => $faker->safeEmail,
|
||||
'password' => $password ?: $password = bcrypt('secret'),
|
||||
'remember_token' => str_random(10),
|
||||
];
|
||||
}
|
||||
);
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\Models\TransactionType::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'type' => $faker->name,
|
||||
];
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
|
1
database/migrations/.gitkeep
Normal file → Executable file
1
database/migrations/.gitkeep
Normal file → Executable file
@ -0,0 +1 @@
|
||||
|
1
database/seeds/.gitkeep
Normal file → Executable file
1
database/seeds/.gitkeep
Normal file → Executable file
@ -0,0 +1 @@
|
||||
|
8
database/seeds/DatabaseSeeder.php
Normal file → Executable file
8
database/seeds/DatabaseSeeder.php
Normal file → Executable file
@ -1,8 +1,5 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
/**
|
||||
@ -10,7 +7,6 @@ use Illuminate\Database\Seeder;
|
||||
*/
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
@ -18,13 +14,11 @@ class DatabaseSeeder extends Seeder
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
Model::unguard();
|
||||
|
||||
$this->call('AccountTypeSeeder');
|
||||
$this->call('TransactionCurrencySeeder');
|
||||
$this->call('TransactionTypeSeeder');
|
||||
$this->call('PermissionSeeder');
|
||||
$this->call('TestDataSeeder');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
19
gulpfile.js
Executable file
19
gulpfile.js
Executable file
@ -0,0 +1,19 @@
|
||||
const elixir = require('laravel-elixir');
|
||||
|
||||
require('laravel-elixir-vue');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Elixir Asset Management
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
|
||||
| for your Laravel application. By default, we are compiling the Sass
|
||||
| file for our application, as well as publishing vendor resources.
|
||||
|
|
||||
*/
|
||||
|
||||
elixir(mix => {
|
||||
mix.sass('app.scss')
|
||||
.webpack('app.js');
|
||||
});
|
18
package.json
18
package.json
@ -1,10 +1,18 @@
|
||||
{
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"gulp": "^3.8.8"
|
||||
"scripts": {
|
||||
"prod": "gulp --production",
|
||||
"dev": "gulp watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"laravel-elixir": "^4.0.0",
|
||||
"bootstrap-sass": "^3.0.0"
|
||||
"devDependencies": {
|
||||
"bootstrap-sass": "^3.3.7",
|
||||
"gulp": "^3.9.1",
|
||||
"jquery": "^3.1.0",
|
||||
"laravel-elixir": "^6.0.0-9",
|
||||
"laravel-elixir-vue": "^0.1.4",
|
||||
"laravel-elixir-webpack-official": "^1.0.2",
|
||||
"lodash": "^4.14.0",
|
||||
"vue": "^1.0.26",
|
||||
"vue-resource": "^0.9.3"
|
||||
}
|
||||
}
|
||||
|
12
phpunit.xml
Normal file → Executable file
12
phpunit.xml
Normal file → Executable file
@ -7,15 +7,15 @@
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="true">
|
||||
stopOnFailure="false">
|
||||
<testsuites>
|
||||
<testsuite name="Application Test Suite">
|
||||
<directory>./tests/</directory>
|
||||
<directory suffix="Test.php">./tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory suffix=".php">app/</directory>
|
||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">./app</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
<php>
|
||||
@ -24,8 +24,4 @@
|
||||
<env name="SESSION_DRIVER" value="array"/>
|
||||
<env name="QUEUE_DRIVER" value="sync"/>
|
||||
</php>
|
||||
|
||||
<listeners>
|
||||
<listener class="JohnKary\PHPUnit\Listener\SpeedTrapListener" />
|
||||
</listeners>
|
||||
</phpunit>
|
||||
|
4
public/.htaccess
Normal file → Executable file
4
public/.htaccess
Normal file → Executable file
@ -13,4 +13,8 @@
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [L]
|
||||
|
||||
# Handle Authorization Header
|
||||
RewriteCond %{HTTP:Authorization} .
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
</IfModule>
|
||||
|
1
resources/views/vendor/.gitkeep
vendored
Normal file → Executable file
1
resources/views/vendor/.gitkeep
vendored
Normal file → Executable file
@ -0,0 +1 @@
|
||||
|
18
routes/api.php
Executable file
18
routes/api.php
Executable file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| API Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register API routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| is assigned the "api" middleware group. Enjoy building your API!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::get('/user', function (Request $request) {
|
||||
return $request->user();
|
||||
})->middleware('auth:api');
|
18
routes/console.php
Executable file
18
routes/console.php
Executable file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Console Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is where you may define all of your Closure based console
|
||||
| commands. Each Closure is bound to a command instance allowing a
|
||||
| simple approach to interacting with each command's IO methods.
|
||||
|
|
||||
*/
|
||||
|
||||
Artisan::command('inspire', function () {
|
||||
$this->comment(Inspiring::quote());
|
||||
});
|
20
routes/web.php
Executable file
20
routes/web.php
Executable file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Web Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is where you may define all of the routes that are handled
|
||||
| by your application. Just tell Laravel the URIs it should respond
|
||||
| to using a Closure or controller method. Build something great!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::get('/', function () {
|
||||
return view('welcome');
|
||||
});
|
||||
|
||||
Auth::routes();
|
||||
|
||||
Route::get('/home', 'HomeController@index');
|
2
server.php
Normal file → Executable file
2
server.php
Normal file → Executable file
@ -5,7 +5,7 @@ declare(strict_types = 1);
|
||||
* Laravel - A PHP Framework For Web Artisans
|
||||
*
|
||||
* @package Laravel
|
||||
* @author Taylor Otwell <taylorotwell@gmail.com>
|
||||
* @author Taylor Otwell <taylor@laravel.com>
|
||||
*/
|
||||
|
||||
$uri = urldecode(
|
||||
|
1
storage/app/.gitignore
vendored
Normal file → Executable file
1
storage/app/.gitignore
vendored
Normal file → Executable file
@ -1,2 +1,3 @@
|
||||
*
|
||||
!public/
|
||||
!.gitignore
|
||||
|
2
storage/app/public/.gitignore
vendored
Executable file
2
storage/app/public/.gitignore
vendored
Executable file
@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
1
storage/framework/.gitignore
vendored
Normal file → Executable file
1
storage/framework/.gitignore
vendored
Normal file → Executable file
@ -1,5 +1,6 @@
|
||||
config.php
|
||||
routes.php
|
||||
schedule-*
|
||||
compiled.php
|
||||
services.json
|
||||
events.scanned.php
|
||||
|
0
storage/framework/cache/.gitignore
vendored
Normal file → Executable file
0
storage/framework/cache/.gitignore
vendored
Normal file → Executable file
0
storage/framework/sessions/.gitignore
vendored
Normal file → Executable file
0
storage/framework/sessions/.gitignore
vendored
Normal file → Executable file
0
storage/framework/views/.gitignore
vendored
Normal file → Executable file
0
storage/framework/views/.gitignore
vendored
Normal file → Executable file
0
storage/logs/.gitignore
vendored
Normal file → Executable file
0
storage/logs/.gitignore
vendored
Normal file → Executable file
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
/**
|
||||
* Class BasicTest
|
||||
*/
|
||||
|
||||
class BasicTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* A basic test example. May take a minute because the test data is being generated.
|
||||
*
|
||||
* @slowThreshold 60000
|
||||
* @return void
|
||||
*/
|
||||
public function testExample()
|
||||
{
|
||||
$this->assertTrue(true);
|
||||
|
||||
}
|
||||
}
|
19
tests/ExampleTest.php
Executable file
19
tests/ExampleTest.php
Executable file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
|
||||
class ExampleTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* A basic functional test example.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testBasicExample()
|
||||
{
|
||||
$this->visit('/')
|
||||
->see('Laravel');
|
||||
}
|
||||
}
|
68
tests/TestCase.php
Normal file → Executable file
68
tests/TestCase.php
Normal file → Executable file
@ -1,11 +1,6 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
|
||||
/**
|
||||
* Class TestCase
|
||||
*/
|
||||
class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||
abstract class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||
{
|
||||
/**
|
||||
* The base URL to use while testing the application.
|
||||
@ -14,7 +9,6 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||
*/
|
||||
protected $baseUrl = 'http://localhost';
|
||||
|
||||
|
||||
/**
|
||||
* Creates the application.
|
||||
*
|
||||
@ -22,68 +16,10 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||
*/
|
||||
public function createApplication()
|
||||
{
|
||||
$app = require __DIR__ . '/../bootstrap/app.php';
|
||||
$app = require __DIR__.'/../bootstrap/app.php';
|
||||
|
||||
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
||||
|
||||
return $app;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
// if the database copy does not exist, call migrate.
|
||||
$copy = storage_path('database') . '/testing-copy.db';
|
||||
$original = storage_path('database') . '/testing.db';
|
||||
|
||||
// move .env file over?
|
||||
if (!file_exists($copy)) {
|
||||
|
||||
// maybe original does?
|
||||
if (!file_exists($original)) {
|
||||
touch($original);
|
||||
Artisan::call('migrate', ['--seed' => true]);
|
||||
}
|
||||
|
||||
copy($original, $copy);
|
||||
} else {
|
||||
if (file_exists($copy)) {
|
||||
copy($copy, $original);
|
||||
}
|
||||
}
|
||||
// if the database copy does exists, copy back as original.
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Tears down the fixture, for example, closes a network connection.
|
||||
* This method is called after a test is executed.
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $class
|
||||
*
|
||||
* @return \Mockery\MockInterface
|
||||
*/
|
||||
protected function mock($class)
|
||||
{
|
||||
$object = Mockery::mock($class);
|
||||
|
||||
|
||||
$this->app->instance($class, $object);
|
||||
|
||||
return $object;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,41 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* TransactionTypeTest.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\Models\TransactionType;
|
||||
|
||||
|
||||
/**
|
||||
* Class TransactionTypeTest
|
||||
*/
|
||||
class TransactionTypeTest extends TestCase
|
||||
{
|
||||
public function testIsWithdrawal()
|
||||
{
|
||||
$transactionType = TransactionType::whereType(TransactionType::WITHDRAWAL)->first();
|
||||
$this->assertTrue($transactionType->isWithdrawal());
|
||||
}
|
||||
|
||||
public function testIsDeposit()
|
||||
{
|
||||
$transactionType = TransactionType::whereType(TransactionType::DEPOSIT)->first();
|
||||
$this->assertTrue($transactionType->isDeposit());
|
||||
}
|
||||
|
||||
public function testIsTransfer()
|
||||
{
|
||||
$transactionType = TransactionType::whereType(TransactionType::TRANSFER)->first();
|
||||
$this->assertTrue($transactionType->isTransfer());
|
||||
}
|
||||
|
||||
public function testIsOpeningBalance()
|
||||
{
|
||||
$transactionType = TransactionType::whereType(TransactionType::OPENING_BALANCE)->first();
|
||||
$this->assertTrue($transactionType->isOpeningBalance());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user