├── public
├── favicon.ico
├── robots.txt
├── .htaccess
└── index.php
├── app
├── Listeners
│ └── .gitkeep
├── Policies
│ └── .gitkeep
├── Events
│ └── Event.php
├── Http
│ ├── Requests
│ │ └── Request.php
│ ├── Middleware
│ │ ├── EncryptCookies.php
│ │ ├── VerifyCsrfToken.php
│ │ ├── RedirectIfAuthenticated.php
│ │ └── Authenticate.php
│ ├── Controllers
│ │ ├── Controller.php
│ │ ├── Auth
│ │ │ ├── PasswordController.php
│ │ │ └── AuthController.php
│ │ ├── TaxesController.php
│ │ ├── DashboardController.php
│ │ ├── VendorsController.php
│ │ ├── AccountsController.php
│ │ ├── CategoriesController.php
│ │ └── TransactionsController.php
│ ├── routes.php
│ └── Kernel.php
├── Vendor.php
├── Category.php
├── Account.php
├── Providers
│ ├── AppServiceProvider.php
│ ├── AuthServiceProvider.php
│ ├── EventServiceProvider.php
│ └── RouteServiceProvider.php
├── Transaction.php
├── Jobs
│ └── Job.php
├── Console
│ ├── Commands
│ │ └── Inspire.php
│ └── Kernel.php
├── User.php
└── Exceptions
│ └── Handler.php
├── database
├── seeds
│ ├── .gitkeep
│ └── DatabaseSeeder.php
├── migrations
│ ├── .gitkeep
│ ├── 2015_11_22_120935_add_accounts_relationship_column.php
│ ├── 2014_10_12_100000_create_password_resets_table.php
│ ├── 2015_11_22_120516_create_accounts_table.php
│ ├── 2015_11_18_042110_create_categories_table.php
│ ├── 2014_10_12_000000_create_users_table.php
│ ├── 2015_11_18_042058_create_vendors_table.php
│ └── 2015_11_16_051726_create_transactions_table.php
├── .gitignore
└── factories
│ └── ModelFactory.php
├── bootstrap
├── cache
│ └── .gitkeep
├── autoload.php
└── app.php
├── resources
├── assets
│ └── sass
│ │ ├── global.scss
│ │ └── bootstrap.scss
├── views
│ ├── partials
│ │ ├── alerts.blade.php
│ │ └── validationErrors.blade.php
│ ├── taxes
│ │ └── index.blade.php
│ ├── dashboard
│ │ └── index.blade.php
│ ├── errors
│ │ └── 503.blade.php
│ ├── vendors
│ │ ├── index.blade.php
│ │ └── showOrUpdate.blade.php
│ ├── accounts
│ │ ├── index.blade.php
│ │ └── showOrUpdate.blade.php
│ ├── categories
│ │ ├── index.blade.php
│ │ └── showOrUpdate.blade.php
│ ├── transactions
│ │ ├── index.blade.php
│ │ └── createOrShowOrUpdate.blade.php
│ └── layouts
│ │ └── master.blade.php
└── lang
│ └── en
│ ├── pagination.php
│ ├── auth.php
│ ├── passwords.php
│ └── validation.php
├── .gitattributes
├── phpspec.yml
├── package.json
├── .gitignore
├── .env.example
├── bower.json
├── tests
├── ExampleTest.php
└── TestCase.php
├── README.md
├── server.php
├── phpunit.xml
├── gulpfile.js
├── config
├── compile.php
├── services.php
├── view.php
├── broadcasting.php
├── cache.php
├── auth.php
├── filesystems.php
├── queue.php
├── database.php
├── mail.php
├── session.php
└── app.php
├── composer.json
└── artisan
/public/favicon.ico:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/Listeners/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/Policies/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/database/seeds/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/bootstrap/cache/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/database/migrations/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite
2 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/resources/assets/sass/global.scss:
--------------------------------------------------------------------------------
1 | body {
2 | padding-top: 50px;
3 | }
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | *.css linguist-vendored
3 | *.less linguist-vendored
4 |
--------------------------------------------------------------------------------
/resources/assets/sass/bootstrap.scss:
--------------------------------------------------------------------------------
1 | @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
2 |
3 |
--------------------------------------------------------------------------------
/app/Events/Event.php:
--------------------------------------------------------------------------------
1 |
3 | {{ session('success') }}
4 |
5 | @endif
--------------------------------------------------------------------------------
/app/Http/Requests/Request.php:
--------------------------------------------------------------------------------
1 | 0)
2 |
52 |
Transactions {{ $vendor->transactions->count() }}
53 | @if ($vendor->transactions->count() == 0)
54 |
55 |
63 | @endif
64 |
65 |
66 | @endsection
--------------------------------------------------------------------------------
/resources/views/categories/showOrUpdate.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.master')
2 |
3 | @section('title', $category->name)
4 |
5 | @section('content')
6 | @include('partials.validationErrors')
7 |
8 |
52 |
Transactions {{ $category->transactions->count() }}
53 | @if ($category->transactions->count() == 0)
54 |
55 |
63 | @endif
64 |
65 |
66 | @endsection
--------------------------------------------------------------------------------
/app/Http/Controllers/VendorsController.php:
--------------------------------------------------------------------------------
1 | orderBy('name')->with('transactions')->get();
21 | return view('vendors.index')->with('vendors', $vendors);
22 | }
23 |
24 | /**
25 | * Show the form for creating a new resource.
26 | *
27 | * @return \Illuminate\Http\Response
28 | */
29 | public function create()
30 | {
31 | return redirect('vendors');
32 | }
33 |
34 | /**
35 | * Store a newly created resource in storage.
36 | *
37 | * @param \Illuminate\Http\Request $request
38 | * @param Vendor $vendor
39 | * @return \Illuminate\Http\Response
40 | */
41 | public function store(Request $request, Vendor $vendor)
42 | {
43 | $this->validate($request, [
44 | 'name' => 'required|unique:categories',
45 | 'slug' => 'required|unique:categories',
46 | ]);
47 |
48 | $input = $request->except(['_token']);
49 | $vendor->fill($input)->save();
50 |
51 | return redirect('vendors')->with('success', 'Vendor successfully added.');
52 | }
53 |
54 | /**
55 | * Display the specified resource.
56 | *
57 | * @param $slug
58 | * @param Vendor $vendor
59 | * @return \Illuminate\Http\Response
60 | */
61 | public function show($slug, Vendor $vendor)
62 | {
63 | $vendor = $vendor->where('slug', '=', $slug)->firstOrFail();
64 | return view('vendors.showOrUpdate')->with('vendor', $vendor);
65 | }
66 |
67 | /**
68 | * Show the form for editing the specified resource.
69 | *
70 | * @param $slug
71 | * @return \Illuminate\Http\Response
72 | */
73 | public function edit($slug)
74 | {
75 | return redirect('vendors/' . $slug);
76 | }
77 |
78 | /**
79 | * Update the specified resource in storage.
80 | *
81 | * @param \Illuminate\Http\Request $request
82 | * @param Vendor $vendor
83 | * @param $slug
84 | * @return \Illuminate\Http\Response
85 | */
86 | public function update(Request $request, Vendor $vendor, $slug)
87 | {
88 | $this->validate($request, [
89 | 'name' => 'required',
90 | 'slug' => 'required',
91 | ]);
92 |
93 | $input = $request->except(['_token', '_method']);
94 | $vendor = $vendor->where('slug', '=', $slug)->firstOrFail();
95 | $vendor->fill($input)->save();
96 |
97 | return redirect('vendors/' . $vendor->slug)->with('success', 'Vendor successfully updated.');
98 | }
99 |
100 | /**
101 | * Remove the specified resource from storage.
102 | *
103 | * @param Vendor $vendor
104 | * @param $slug
105 | * @return \Illuminate\Http\Response
106 | */
107 | public function destroy(Vendor $vendor, $slug)
108 | {
109 | $vendor = $vendor->where('slug', '=', $slug)->firstOrFail();
110 | $vendorName = $vendor->name;
111 | $vendor->delete();
112 | return redirect('vendors')->with('success', 'Successfully deleted "' . $vendorName . '" vendor.');
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/app/Http/Controllers/AccountsController.php:
--------------------------------------------------------------------------------
1 | orderBy('name')->with('transactions')->get();
19 | return view('accounts.index')->with('accounts', $accounts);
20 | }
21 |
22 | /**
23 | * Show the form for creating a new resource.
24 | *
25 | * @return \Illuminate\Http\Response
26 | */
27 | public function create()
28 | {
29 | return redirect('accounts');
30 | }
31 |
32 | /**
33 | * Store a newly created resource in storage.
34 | *
35 | * @param \Illuminate\Http\Request $request
36 | * @param Account $account
37 | * @return \Illuminate\Http\Response
38 | */
39 | public function store(Request $request, Account $account)
40 | {
41 | $this->validate($request, [
42 | 'name' => 'required|unique:accounts',
43 | 'slug' => 'required|unique:accounts',
44 | ]);
45 |
46 | $input = $request->except(['_token']);
47 | $account->fill($input)->save();
48 |
49 | return redirect('accounts')->with('success', $account->name . ' account successfully added.');
50 | }
51 |
52 | /**
53 | * Display the specified resource.
54 | *
55 | * @param Account $account
56 | * @param string $slug
57 | * @return \Illuminate\Http\Response
58 | */
59 | public function show(Account $account, $slug)
60 | {
61 | $account = $account->where('slug', '=', $slug)->firstOrFail();
62 | return view('accounts.showOrUpdate')->with('account', $account);
63 | }
64 |
65 | /**
66 | * Show the form for editing the specified resource.
67 | *
68 | * @param string $slug
69 | * @return \Illuminate\Http\Response
70 | */
71 | public function edit($slug)
72 | {
73 | return redirect('accounts/' . $slug);
74 | }
75 |
76 | /**
77 | * Update the specified resource in storage.
78 | *
79 | * @param \Illuminate\Http\Request $request
80 | * @param Account $account
81 | * @param string $slug
82 | * @return \Illuminate\Http\Response
83 | */
84 | public function update(Request $request, Account $account, $slug)
85 | {
86 | $this->validate($request, [
87 | 'name' => 'required',
88 | 'slug' => 'required'
89 | ]);
90 |
91 | $input = $request->except(['_token', '_method']);
92 | $account = $account->where('slug', '=', $slug)->firstOrFail();
93 | $account->fill($input)->save();
94 |
95 | return redirect('accounts/' . $account->slug)->with('success', 'Account successfully updated.');
96 | }
97 |
98 | /**
99 | * Remove the specified resource from storage.
100 | *
101 | * @param Account $account
102 | * @param string $slug
103 | * @return \Illuminate\Http\Response
104 | */
105 | public function destroy(Account $account, $slug)
106 | {
107 | $account = $account->where('slug', '=', $slug)->firstOrFail();
108 | $accountName = $account->name;
109 | $account->delete();
110 | return redirect('accounts')->with('success', 'Successfully deleted "' . $accountName . '" account.');
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/app/Http/Controllers/CategoriesController.php:
--------------------------------------------------------------------------------
1 | orderBy('name')->with('transactions')->get();
21 | return view('categories.index')->with('categories', $categories);
22 | }
23 |
24 | /**
25 | * Show the form for creating a new resource.
26 | *
27 | * @return \Illuminate\Http\Response
28 | */
29 | public function create()
30 | {
31 | return redirect('/categories');
32 | }
33 |
34 | /**
35 | * Store a newly created resource in storage.
36 | *
37 | * @param \Illuminate\Http\Request $request
38 | * @param Category $category
39 | * @return \Illuminate\Http\Response
40 | */
41 | public function store(Request $request, Category $category)
42 | {
43 | $this->validate($request, [
44 | 'name' => 'required|unique:categories',
45 | 'slug' => 'required|unique:categories',
46 | ]);
47 |
48 | $input = $request->except(['_token']);
49 | $category->fill($input)->save();
50 |
51 | return redirect('categories')->with('success', $category->name . ' category successfully added.');
52 | }
53 |
54 | /**
55 | * Display the specified resource.
56 | *
57 | * @param $slug
58 | * @param Category $category
59 | * @return \Illuminate\Http\Response
60 | */
61 | public function show($slug, Category $category)
62 | {
63 | $category = $category->where('slug', '=', $slug)->firstOrFail();
64 | return view('categories.showOrUpdate')->with('category', $category);
65 | }
66 |
67 | /**
68 | * Show the form for editing the specified resource.
69 | *
70 | * @param $slug
71 | * @return \Illuminate\Http\Response
72 | */
73 | public function edit($slug)
74 | {
75 | return redirect('categories/' . $slug);
76 | }
77 |
78 | /**
79 | * Update the specified resource in storage.
80 | *
81 | * @param \Illuminate\Http\Request $request
82 | * @param Category $category
83 | * @param $slug
84 | * @return \Illuminate\Http\Response
85 | */
86 | public function update(Request $request, Category $category, $slug)
87 | {
88 | $this->validate($request, [
89 | 'name' => 'required',
90 | 'slug' => 'required',
91 | ]);
92 |
93 | $input = $request->except(['_token', '_method']);
94 | $category = $category->where('slug', '=', $slug)->firstOrFail();
95 | $category->fill($input)->save();
96 |
97 | return redirect('categories/' . $category->slug)->with('success', 'Category successfully updated.');
98 | }
99 |
100 | /**
101 | * Remove the specified resource from storage.
102 | *
103 | * @param Category $category
104 | * @param $slug
105 | * @return \Illuminate\Http\Response
106 | */
107 | public function destroy(Category $category, $slug)
108 | {
109 | $category = $category->where('slug', '=', $slug)->firstOrFail();
110 | $categoryName = $category->name;
111 | $category->delete();
112 | return redirect('categories')->with('success', 'Successfully deleted "' . $categoryName . '" category.');
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/resources/views/accounts/showOrUpdate.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.master')
2 |
3 | @section('title', $account->name)
4 |
5 | @section('content')
6 | @include('partials.validationErrors')
7 |
8 |
65 |
Transactions {{ $account->transactions->count() }}
66 | @if ($account->transactions->count() == 0)
67 |
68 |
76 | @endif
77 |
78 |
79 | @endsection
--------------------------------------------------------------------------------
/resources/views/transactions/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.master')
2 |
3 | @section('title', 'Transactions
65 |
68 |
69 | @include('partials.alerts')
70 |
71 | @yield('content')
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/config/database.php:
--------------------------------------------------------------------------------
1 | PDO::FETCH_CLASS,
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Default Database Connection Name
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may specify which of the database connections below you wish
24 | | to use as your default connection for all database work. Of course
25 | | you may use many connections at once using the Database library.
26 | |
27 | */
28 |
29 | 'default' => env('DB_CONNECTION', 'mysql'),
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Database Connections
34 | |--------------------------------------------------------------------------
35 | |
36 | | Here are each of the database connections setup for your application.
37 | | Of course, examples of configuring each database platform that is
38 | | supported by Laravel is shown below to make development simple.
39 | |
40 | |
41 | | All database work in Laravel is done through the PHP PDO facilities
42 | | so make sure you have the driver for your particular database of
43 | | choice installed on your machine before you begin development.
44 | |
45 | */
46 |
47 | 'connections' => [
48 |
49 | 'sqlite' => [
50 | 'driver' => 'sqlite',
51 | 'database' => database_path('database.sqlite'),
52 | 'prefix' => '',
53 | ],
54 |
55 | 'mysql' => [
56 | 'driver' => 'mysql',
57 | 'host' => env('DB_HOST', 'localhost'),
58 | 'database' => env('DB_DATABASE', 'accounting'),
59 | 'username' => env('DB_USERNAME', 'homestead'),
60 | 'password' => env('DB_PASSWORD', 'secret'),
61 | 'charset' => 'utf8',
62 | 'collation' => 'utf8_unicode_ci',
63 | 'prefix' => '',
64 | 'strict' => false,
65 | ],
66 |
67 | 'pgsql' => [
68 | 'driver' => 'pgsql',
69 | 'host' => env('DB_HOST', 'localhost'),
70 | 'database' => env('DB_DATABASE', 'forge'),
71 | 'username' => env('DB_USERNAME', 'forge'),
72 | 'password' => env('DB_PASSWORD', ''),
73 | 'charset' => 'utf8',
74 | 'prefix' => '',
75 | 'schema' => 'public',
76 | ],
77 |
78 | 'sqlsrv' => [
79 | 'driver' => 'sqlsrv',
80 | 'host' => env('DB_HOST', 'localhost'),
81 | 'database' => env('DB_DATABASE', 'forge'),
82 | 'username' => env('DB_USERNAME', 'forge'),
83 | 'password' => env('DB_PASSWORD', ''),
84 | 'charset' => 'utf8',
85 | 'prefix' => '',
86 | ],
87 |
88 | ],
89 |
90 | /*
91 | |--------------------------------------------------------------------------
92 | | Migration Repository Table
93 | |--------------------------------------------------------------------------
94 | |
95 | | This table keeps track of all the migrations that have already run for
96 | | your application. Using this information, we can determine which of
97 | | the migrations on disk haven't actually been run in the database.
98 | |
99 | */
100 |
101 | 'migrations' => 'migrations',
102 |
103 | /*
104 | |--------------------------------------------------------------------------
105 | | Redis Databases
106 | |--------------------------------------------------------------------------
107 | |
108 | | Redis is an open source, fast, and advanced key-value store that also
109 | | provides a richer set of commands than a typical key-value systems
110 | | such as APC or Memcached. Laravel makes it easy to dig right in.
111 | |
112 | */
113 |
114 | 'redis' => [
115 |
116 | 'cluster' => false,
117 |
118 | 'default' => [
119 | 'host' => '127.0.0.1',
120 | 'port' => 6379,
121 | 'database' => 0,
122 | ],
123 |
124 | ],
125 |
126 | ];
127 |
--------------------------------------------------------------------------------
/config/mail.php:
--------------------------------------------------------------------------------
1 | env('MAIL_DRIVER', 'smtp'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | SMTP Host Address
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may provide the host address of the SMTP server used by your
26 | | applications. A default option is provided that is compatible with
27 | | the Mailgun mail service which will provide reliable deliveries.
28 | |
29 | */
30 |
31 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
32 |
33 | /*
34 | |--------------------------------------------------------------------------
35 | | SMTP Host Port
36 | |--------------------------------------------------------------------------
37 | |
38 | | This is the SMTP port used by your application to deliver e-mails to
39 | | users of the application. Like the host we have set this value to
40 | | stay compatible with the Mailgun e-mail application by default.
41 | |
42 | */
43 |
44 | 'port' => env('MAIL_PORT', 587),
45 |
46 | /*
47 | |--------------------------------------------------------------------------
48 | | Global "From" Address
49 | |--------------------------------------------------------------------------
50 | |
51 | | You may wish for all e-mails sent by your application to be sent from
52 | | the same address. Here, you may specify a name and address that is
53 | | used globally for all e-mails that are sent by your application.
54 | |
55 | */
56 |
57 | 'from' => ['address' => null, 'name' => null],
58 |
59 | /*
60 | |--------------------------------------------------------------------------
61 | | E-Mail Encryption Protocol
62 | |--------------------------------------------------------------------------
63 | |
64 | | Here you may specify the encryption protocol that should be used when
65 | | the application send e-mail messages. A sensible default using the
66 | | transport layer security protocol should provide great security.
67 | |
68 | */
69 |
70 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'),
71 |
72 | /*
73 | |--------------------------------------------------------------------------
74 | | SMTP Server Username
75 | |--------------------------------------------------------------------------
76 | |
77 | | If your SMTP server requires a username for authentication, you should
78 | | set it here. This will get used to authenticate with your server on
79 | | connection. You may also set the "password" value below this one.
80 | |
81 | */
82 |
83 | 'username' => env('MAIL_USERNAME'),
84 |
85 | /*
86 | |--------------------------------------------------------------------------
87 | | SMTP Server Password
88 | |--------------------------------------------------------------------------
89 | |
90 | | Here you may set the password required by your SMTP server to send out
91 | | messages from your application. This will be given to the server on
92 | | connection so that the application will be able to send messages.
93 | |
94 | */
95 |
96 | 'password' => env('MAIL_PASSWORD'),
97 |
98 | /*
99 | |--------------------------------------------------------------------------
100 | | Sendmail System Path
101 | |--------------------------------------------------------------------------
102 | |
103 | | When using the "sendmail" driver to send e-mails, we will need to know
104 | | the path to where Sendmail lives on this server. A default path has
105 | | been provided here, which will work well on most of your systems.
106 | |
107 | */
108 |
109 | 'sendmail' => '/usr/sbin/sendmail -bs',
110 |
111 | /*
112 | |--------------------------------------------------------------------------
113 | | Mail "Pretend"
114 | |--------------------------------------------------------------------------
115 | |
116 | | When this option is enabled, e-mail will not actually be sent over the
117 | | web and will instead be written to your application's logs files so
118 | | you may inspect the message. This is great for local development.
119 | |
120 | */
121 |
122 | 'pretend' => env('MAIL_PRETEND', false),
123 |
124 | ];
125 |
--------------------------------------------------------------------------------
/config/session.php:
--------------------------------------------------------------------------------
1 | env('SESSION_DRIVER', 'file'),
20 |
21 | /*
22 | |--------------------------------------------------------------------------
23 | | Session Lifetime
24 | |--------------------------------------------------------------------------
25 | |
26 | | Here you may specify the number of minutes that you wish the session
27 | | to be allowed to remain idle before it expires. If you want them
28 | | to immediately expire on the browser closing, set that option.
29 | |
30 | */
31 |
32 | 'lifetime' => 120,
33 |
34 | 'expire_on_close' => false,
35 |
36 | /*
37 | |--------------------------------------------------------------------------
38 | | Session Encryption
39 | |--------------------------------------------------------------------------
40 | |
41 | | This option allows you to easily specify that all of your session data
42 | | should be encrypted before it is stored. All encryption will be run
43 | | automatically by Laravel and you can use the Session like normal.
44 | |
45 | */
46 |
47 | 'encrypt' => false,
48 |
49 | /*
50 | |--------------------------------------------------------------------------
51 | | Session File Location
52 | |--------------------------------------------------------------------------
53 | |
54 | | When using the native session driver, we need a location where session
55 | | files may be stored. A default has been set for you but a different
56 | | location may be specified. This is only needed for file sessions.
57 | |
58 | */
59 |
60 | 'files' => storage_path('framework/sessions'),
61 |
62 | /*
63 | |--------------------------------------------------------------------------
64 | | Session Database Connection
65 | |--------------------------------------------------------------------------
66 | |
67 | | When using the "database" or "redis" session drivers, you may specify a
68 | | connection that should be used to manage these sessions. This should
69 | | correspond to a connection in your database configuration options.
70 | |
71 | */
72 |
73 | 'connection' => null,
74 |
75 | /*
76 | |--------------------------------------------------------------------------
77 | | Session Database Table
78 | |--------------------------------------------------------------------------
79 | |
80 | | When using the "database" session driver, you may specify the table we
81 | | should use to manage the sessions. Of course, a sensible default is
82 | | provided for you; however, you are free to change this as needed.
83 | |
84 | */
85 |
86 | 'table' => 'sessions',
87 |
88 | /*
89 | |--------------------------------------------------------------------------
90 | | Session Sweeping Lottery
91 | |--------------------------------------------------------------------------
92 | |
93 | | Some session drivers must manually sweep their storage location to get
94 | | rid of old sessions from storage. Here are the chances that it will
95 | | happen on a given request. By default, the odds are 2 out of 100.
96 | |
97 | */
98 |
99 | 'lottery' => [2, 100],
100 |
101 | /*
102 | |--------------------------------------------------------------------------
103 | | Session Cookie Name
104 | |--------------------------------------------------------------------------
105 | |
106 | | Here you may change the name of the cookie used to identify a session
107 | | instance by ID. The name specified here will get used every time a
108 | | new session cookie is created by the framework for every driver.
109 | |
110 | */
111 |
112 | 'cookie' => 'laravel_session',
113 |
114 | /*
115 | |--------------------------------------------------------------------------
116 | | Session Cookie Path
117 | |--------------------------------------------------------------------------
118 | |
119 | | The session cookie path determines the path for which the cookie will
120 | | be regarded as available. Typically, this will be the root path of
121 | | your application but you are free to change this when necessary.
122 | |
123 | */
124 |
125 | 'path' => '/',
126 |
127 | /*
128 | |--------------------------------------------------------------------------
129 | | Session Cookie Domain
130 | |--------------------------------------------------------------------------
131 | |
132 | | Here you may change the domain of the cookie used to identify a session
133 | | in your application. This will determine which domains the cookie is
134 | | available to in your application. A sensible default has been set.
135 | |
136 | */
137 |
138 | 'domain' => null,
139 |
140 | /*
141 | |--------------------------------------------------------------------------
142 | | HTTPS Only Cookies
143 | |--------------------------------------------------------------------------
144 | |
145 | | By setting this option to true, session cookies will only be sent back
146 | | to the server if the browser has a HTTPS connection. This will keep
147 | | the cookie from being sent to you if it can not be done securely.
148 | |
149 | */
150 |
151 | 'secure' => false,
152 |
153 | ];
154 |
--------------------------------------------------------------------------------
/resources/lang/en/validation.php:
--------------------------------------------------------------------------------
1 | 'The :attribute must be accepted.',
17 | 'active_url' => 'The :attribute is not a valid URL.',
18 | 'after' => 'The :attribute must be a date after :date.',
19 | 'alpha' => 'The :attribute may only contain letters.',
20 | 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
21 | 'alpha_num' => 'The :attribute may only contain letters and numbers.',
22 | 'array' => 'The :attribute must be an array.',
23 | 'before' => 'The :attribute must be a date before :date.',
24 | 'between' => [
25 | 'numeric' => 'The :attribute must be between :min and :max.',
26 | 'file' => 'The :attribute must be between :min and :max kilobytes.',
27 | 'string' => 'The :attribute must be between :min and :max characters.',
28 | 'array' => 'The :attribute must have between :min and :max items.',
29 | ],
30 | 'boolean' => 'The :attribute field must be true or false.',
31 | 'confirmed' => 'The :attribute confirmation does not match.',
32 | 'date' => 'The :attribute is not a valid date.',
33 | 'date_format' => 'The :attribute does not match the format :format.',
34 | 'different' => 'The :attribute and :other must be different.',
35 | 'digits' => 'The :attribute must be :digits digits.',
36 | 'digits_between' => 'The :attribute must be between :min and :max digits.',
37 | 'email' => 'The :attribute must be a valid email address.',
38 | 'exists' => 'The selected :attribute is invalid.',
39 | 'filled' => 'The :attribute field is required.',
40 | 'image' => 'The :attribute must be an image.',
41 | 'in' => 'The selected :attribute is invalid.',
42 | 'integer' => 'The :attribute must be an integer.',
43 | 'ip' => 'The :attribute must be a valid IP address.',
44 | 'json' => 'The :attribute must be a valid JSON string.',
45 | 'max' => [
46 | 'numeric' => 'The :attribute may not be greater than :max.',
47 | 'file' => 'The :attribute may not be greater than :max kilobytes.',
48 | 'string' => 'The :attribute may not be greater than :max characters.',
49 | 'array' => 'The :attribute may not have more than :max items.',
50 | ],
51 | 'mimes' => 'The :attribute must be a file of type: :values.',
52 | 'min' => [
53 | 'numeric' => 'The :attribute must be at least :min.',
54 | 'file' => 'The :attribute must be at least :min kilobytes.',
55 | 'string' => 'The :attribute must be at least :min characters.',
56 | 'array' => 'The :attribute must have at least :min items.',
57 | ],
58 | 'not_in' => 'The selected :attribute is invalid.',
59 | 'numeric' => 'The :attribute must be a number.',
60 | 'regex' => 'The :attribute format is invalid.',
61 | 'required' => 'The :attribute field is required.',
62 | 'required_if' => 'The :attribute field is required when :other is :value.',
63 | 'required_unless' => 'The :attribute field is required unless :other is in :values.',
64 | 'required_with' => 'The :attribute field is required when :values is present.',
65 | 'required_with_all' => 'The :attribute field is required when :values is present.',
66 | 'required_without' => 'The :attribute field is required when :values is not present.',
67 | 'required_without_all' => 'The :attribute field is required when none of :values are present.',
68 | 'same' => 'The :attribute and :other must match.',
69 | 'size' => [
70 | 'numeric' => 'The :attribute must be :size.',
71 | 'file' => 'The :attribute must be :size kilobytes.',
72 | 'string' => 'The :attribute must be :size characters.',
73 | 'array' => 'The :attribute must contain :size items.',
74 | ],
75 | 'string' => 'The :attribute must be a string.',
76 | 'timezone' => 'The :attribute must be a valid zone.',
77 | 'unique' => 'The :attribute has already been taken.',
78 | 'url' => 'The :attribute format is invalid.',
79 |
80 | /*
81 | |--------------------------------------------------------------------------
82 | | Custom Validation Language Lines
83 | |--------------------------------------------------------------------------
84 | |
85 | | Here you may specify custom validation messages for attributes using the
86 | | convention "attribute.rule" to name the lines. This makes it quick to
87 | | specify a specific custom language line for a given attribute rule.
88 | |
89 | */
90 |
91 | 'custom' => [
92 | 'attribute-name' => [
93 | 'rule-name' => 'custom-message',
94 | ],
95 | ],
96 |
97 | /*
98 | |--------------------------------------------------------------------------
99 | | Custom Validation Attributes
100 | |--------------------------------------------------------------------------
101 | |
102 | | The following language lines are used to swap attribute place-holders
103 | | with something more reader friendly such as E-Mail Address instead
104 | | of "email". This simply helps us make messages a little cleaner.
105 | |
106 | */
107 |
108 | 'attributes' => [],
109 |
110 | ];
111 |
--------------------------------------------------------------------------------
/config/app.php:
--------------------------------------------------------------------------------
1 | env('APP_DEBUG', true),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Application URL
21 | |--------------------------------------------------------------------------
22 | |
23 | | This URL is used by the console to properly generate URLs when using
24 | | the Artisan command line tool. You should set this to the root of
25 | | your application so that it is used when running Artisan tasks.
26 | |
27 | */
28 |
29 | 'url' => 'http://localhost',
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Application Timezone
34 | |--------------------------------------------------------------------------
35 | |
36 | | Here you may specify the default timezone for your application, which
37 | | will be used by the PHP date and date-time functions. We have gone
38 | | ahead and set this to a sensible default for you out of the box.
39 | |
40 | */
41 |
42 | 'timezone' => 'America/Los_Angeles',
43 |
44 | /*
45 | |--------------------------------------------------------------------------
46 | | Application Locale Configuration
47 | |--------------------------------------------------------------------------
48 | |
49 | | The application locale determines the default locale that will be used
50 | | by the translation service provider. You are free to set this value
51 | | to any of the locales which will be supported by the application.
52 | |
53 | */
54 |
55 | 'locale' => 'en',
56 |
57 | /*
58 | |--------------------------------------------------------------------------
59 | | Application Fallback Locale
60 | |--------------------------------------------------------------------------
61 | |
62 | | The fallback locale determines the locale to use when the current one
63 | | is not available. You may change the value to correspond to any of
64 | | the language folders that are provided through your application.
65 | |
66 | */
67 |
68 | 'fallback_locale' => 'en',
69 |
70 | /*
71 | |--------------------------------------------------------------------------
72 | | Encryption Key
73 | |--------------------------------------------------------------------------
74 | |
75 | | This key is used by the Illuminate encrypter service and should be set
76 | | to a random, 32 character string, otherwise these encrypted strings
77 | | will not be safe. Please do this before deploying an application!
78 | |
79 | */
80 |
81 | 'key' => env('APP_KEY', 'SomeRandomString'),
82 |
83 | 'cipher' => 'AES-256-CBC',
84 |
85 | /*
86 | |--------------------------------------------------------------------------
87 | | Logging Configuration
88 | |--------------------------------------------------------------------------
89 | |
90 | | Here you may configure the log settings for your application. Out of
91 | | the box, Laravel uses the Monolog PHP logging library. This gives
92 | | you a variety of powerful log handlers / formatters to utilize.
93 | |
94 | | Available Settings: "single", "daily", "syslog", "errorlog"
95 | |
96 | */
97 |
98 | 'log' => env('APP_LOG', 'single'),
99 |
100 | /*
101 | |--------------------------------------------------------------------------
102 | | Autoloaded Service Providers
103 | |--------------------------------------------------------------------------
104 | |
105 | | The service providers listed here will be automatically loaded on the
106 | | request to your application. Feel free to add your own services to
107 | | this array to grant expanded functionality to your applications.
108 | |
109 | */
110 |
111 | 'providers' => [
112 |
113 | /*
114 | * Laravel Framework Service Providers...
115 | */
116 | Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
117 | Illuminate\Auth\AuthServiceProvider::class,
118 | Illuminate\Broadcasting\BroadcastServiceProvider::class,
119 | Illuminate\Bus\BusServiceProvider::class,
120 | Illuminate\Cache\CacheServiceProvider::class,
121 | Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
122 | Illuminate\Routing\ControllerServiceProvider::class,
123 | Illuminate\Cookie\CookieServiceProvider::class,
124 | Illuminate\Database\DatabaseServiceProvider::class,
125 | Illuminate\Encryption\EncryptionServiceProvider::class,
126 | Illuminate\Filesystem\FilesystemServiceProvider::class,
127 | Illuminate\Foundation\Providers\FoundationServiceProvider::class,
128 | Illuminate\Hashing\HashServiceProvider::class,
129 | Illuminate\Mail\MailServiceProvider::class,
130 | Illuminate\Pagination\PaginationServiceProvider::class,
131 | Illuminate\Pipeline\PipelineServiceProvider::class,
132 | Illuminate\Queue\QueueServiceProvider::class,
133 | Illuminate\Redis\RedisServiceProvider::class,
134 | Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
135 | Illuminate\Session\SessionServiceProvider::class,
136 | Illuminate\Translation\TranslationServiceProvider::class,
137 | Illuminate\Validation\ValidationServiceProvider::class,
138 | Illuminate\View\ViewServiceProvider::class,
139 | Barryvdh\Debugbar\ServiceProvider::class,
140 |
141 | /*
142 | * Application Service Providers...
143 | */
144 | App\Providers\AppServiceProvider::class,
145 | App\Providers\AuthServiceProvider::class,
146 | App\Providers\EventServiceProvider::class,
147 | App\Providers\RouteServiceProvider::class,
148 |
149 | ],
150 |
151 | /*
152 | |--------------------------------------------------------------------------
153 | | Class Aliases
154 | |--------------------------------------------------------------------------
155 | |
156 | | This array of class aliases will be registered when this application
157 | | is started. However, feel free to register as many as you wish as
158 | | the aliases are "lazy" loaded so they don't hinder performance.
159 | |
160 | */
161 |
162 | 'aliases' => [
163 |
164 | 'App' => Illuminate\Support\Facades\App::class,
165 | 'Artisan' => Illuminate\Support\Facades\Artisan::class,
166 | 'Auth' => Illuminate\Support\Facades\Auth::class,
167 | 'Blade' => Illuminate\Support\Facades\Blade::class,
168 | 'Bus' => Illuminate\Support\Facades\Bus::class,
169 | 'Cache' => Illuminate\Support\Facades\Cache::class,
170 | 'Config' => Illuminate\Support\Facades\Config::class,
171 | 'Cookie' => Illuminate\Support\Facades\Cookie::class,
172 | 'Crypt' => Illuminate\Support\Facades\Crypt::class,
173 | 'DB' => Illuminate\Support\Facades\DB::class,
174 | 'Eloquent' => Illuminate\Database\Eloquent\Model::class,
175 | 'Event' => Illuminate\Support\Facades\Event::class,
176 | 'File' => Illuminate\Support\Facades\File::class,
177 | 'Gate' => Illuminate\Support\Facades\Gate::class,
178 | 'Hash' => Illuminate\Support\Facades\Hash::class,
179 | 'Input' => Illuminate\Support\Facades\Input::class,
180 | 'Inspiring' => Illuminate\Foundation\Inspiring::class,
181 | 'Lang' => Illuminate\Support\Facades\Lang::class,
182 | 'Log' => Illuminate\Support\Facades\Log::class,
183 | 'Mail' => Illuminate\Support\Facades\Mail::class,
184 | 'Password' => Illuminate\Support\Facades\Password::class,
185 | 'Queue' => Illuminate\Support\Facades\Queue::class,
186 | 'Redirect' => Illuminate\Support\Facades\Redirect::class,
187 | 'Redis' => Illuminate\Support\Facades\Redis::class,
188 | 'Request' => Illuminate\Support\Facades\Request::class,
189 | 'Response' => Illuminate\Support\Facades\Response::class,
190 | 'Route' => Illuminate\Support\Facades\Route::class,
191 | 'Schema' => Illuminate\Support\Facades\Schema::class,
192 | 'Session' => Illuminate\Support\Facades\Session::class,
193 | 'Storage' => Illuminate\Support\Facades\Storage::class,
194 | 'URL' => Illuminate\Support\Facades\URL::class,
195 | 'Validator' => Illuminate\Support\Facades\Validator::class,
196 | 'View' => Illuminate\Support\Facades\View::class,
197 |
198 | ],
199 |
200 | ];
201 |
--------------------------------------------------------------------------------
/app/Http/Controllers/TransactionsController.php:
--------------------------------------------------------------------------------
1 | orderBy('timestamp', 'ASC')->with('category', 'vendor');
29 |
30 | $activeFilters = [];
31 |
32 | // Account filter
33 | if ($accountFilter = $request->input('account')) {
34 | $query->whereHas('account', function ($q) use ($accountFilter) {
35 | $q->where('slug', '=', $accountFilter);
36 | });
37 | $activeFilters['account'] = [
38 | 'name' => Account::where('slug', '=', $accountFilter)->first()->name,
39 | 'removedUri' => http_build_query($request->except('account'))
40 | ];
41 | }
42 |
43 | // Vendor filter
44 | if ($vendorFilter = $request->input('vendor')) {
45 | $query->whereHas('vendor', function ($q) use ($vendorFilter) {
46 | $q->where('slug', '=', $vendorFilter);
47 | });
48 | $activeFilters['vendor'] = [
49 | 'name' => Vendor::where('slug', '=', $vendorFilter)->first()->name,
50 | 'removedUri' => http_build_query($request->except('vendor'))
51 | ];
52 | }
53 |
54 | // Category filter
55 | if ($categoryFilter = $request->input('category')) {
56 | $query->whereHas('category', function ($q) use ($categoryFilter) {
57 | $q->where('slug', '=', $categoryFilter);
58 | });
59 | $activeFilters['category'] = [
60 | 'name' => Category::where('slug', '=', $categoryFilter)->first()->name,
61 | 'removedUri' => http_build_query($request->except('category'))
62 | ];
63 | }
64 |
65 | // Business filter
66 | if (($businessFilter = $request->input('business')) === "") {
67 | $query->where('business_expense', '=', '1');
68 | $activeFilters['business expense'] = [
69 | 'name' => '',
70 | 'removedUri' => http_build_query($request->except('business'))
71 | ];
72 | }
73 |
74 | // Charity filter
75 | if (($charityFilter = $request->input('charity')) === "") {
76 | $query->where('charitable_deduction', '=', '1');
77 | $activeFilters['charitable deduction'] = [
78 | 'name' => '',
79 | 'removedUri' => http_build_query($request->except('charity'))
80 | ];
81 | }
82 |
83 | // Execute query
84 | $this->transactions = $query->get();
85 |
86 | $this->calculateRowBalances();
87 | $rows = $this->transactions->reverse();
88 | return view('transactions.index', [
89 | 'rows' => $rows,
90 | 'balance' => money_format('%(!i', @$rows[0]->balance),
91 | 'filters' => $activeFilters
92 | ])->withInput($request->all());
93 | }
94 |
95 | /**
96 | * Calculate running balance of rows
97 | *
98 | * @return void
99 | */
100 | public function calculateRowBalances()
101 | {
102 | $this->transactions->each(function($row, $key) {
103 | // Get previous row
104 | $previousRow = $this->transactions->get($key - 1);
105 | $previousRowBalance = 0;
106 | if ($previousRow instanceof Transaction) {
107 | $previousRowBalance = $previousRow->balance;
108 | }
109 |
110 | $row->balance = $row->amount + $previousRowBalance;
111 | });
112 | }
113 |
114 | /**
115 | * Show the form for creating a new resource.
116 | *
117 | * @return \Illuminate\Http\Response
118 | */
119 | public function create(Request $request, Account $accounts, Vendor $vendors, Category $categories)
120 | {
121 | $type = key(array_where($request->only(['transfer', 'income']), function ($key, $value) {
122 | return $value !== null;
123 | }));
124 |
125 | return view('transactions.createOrShowOrUpdate', [
126 | 'vendors' => $vendors->orderBy('name')->get(),
127 | 'categories' => $categories->orderBy('name')->get(),
128 | 'type' => $type ?: 'expense',
129 | 'accounts' => $accounts->orderBy('name')->get()
130 | ]);
131 | }
132 |
133 | /**
134 | * Store a newly created resource in storage.
135 | *
136 | * @param \Illuminate\Http\Request $request
137 | * @param Transaction $transaction
138 | * @return \Illuminate\Http\Response
139 | */
140 | public function store(Request $request, Transaction $transaction)
141 | {
142 | if ($request->input('type') == 'transfer') {
143 | return $this->storeTransfer($request);
144 | }
145 | $this->validate($request, [
146 | 'type' => 'required|in:expense,transfer,income',
147 | 'account' => 'required:exists:accounts,id',
148 | 'vendor' => 'required|exists:vendors,id',
149 | 'category' => 'exists:categories,id',
150 | 'description' => 'max:255',
151 | 'timestamp' => 'required|date_format:Y-m-d\TH:i|before:' . date('Y-m-d\TH:i'),
152 | 'amount' => 'required|numeric'
153 | ]);
154 |
155 | $input = $request->except(['_token']);
156 | if ($input['type'] == 'expense' && $input['amount'] > 0) {
157 | $input['amount'] = $input['amount'] * -1;
158 | }
159 | $input['account_id'] = $input['account'];
160 | $input['vendor_id'] = $input['vendor'];
161 | $input['category_id'] = $input['category'];
162 | unset($input['type'], $input['account'], $input['vendor'], $input['category']);
163 |
164 | $transaction->fill($input)->save();
165 |
166 | return redirect('transactions')->with('success', 'Transaction successfully added.');
167 | }
168 |
169 | protected function storeTransfer(Request $request)
170 | {
171 | $this->validate($request, [
172 | 'type' => 'required|in:expense,transfer,income',
173 | 'from_account' => 'required:exists:accounts,id',
174 | 'to_account' => 'required:exists:accounts,id',
175 | 'description' => 'max:255',
176 | 'timestamp' => 'required|date_format:Y-m-d\TH:i|before:' . date('Y-m-d\TH:i'),
177 | 'amount' => 'required|numeric'
178 | ]);
179 |
180 | $input = $request->except(['_token']);
181 | $originalAmount = $input['amount'];
182 | unset($input['type'], $input['vendor'], $input['category']);
183 |
184 | // Save the expense
185 | $input['account_id'] = $input['from_account'];
186 | if ($input['amount'] > 0) {
187 | $input['amount'] = $input['amount'] * -1;
188 | }
189 | (new Transaction)->fill($input)->save();
190 |
191 | // Save the income
192 | $input['account_id'] = $input['to_account'];
193 | $input['amount'] = $originalAmount;
194 | (new Transaction)->fill($input)->save();
195 |
196 | return redirect('transactions')->with('success', 'Transactions successfully added.');
197 | }
198 |
199 | /**
200 | * Display the specified resource.
201 | *
202 | * @param Transaction $transaction
203 | * @param Account $accounts
204 | * @param Vendor $vendors
205 | * @param Category $categories
206 | * @param int $id
207 | * @return \Illuminate\Http\Response
208 | */
209 | public function show(Transaction $transaction, Account $accounts, Vendor $vendors, Category $categories, $id)
210 | {
211 | $transaction = $transaction->with(['category', 'vendor'])->where('id', '=', $id)->firstOrFail();
212 | $transaction->timestamp = str_replace(' ', 'T', $transaction->timestamp);
213 | if ($transaction->amount < 0) {
214 | $type = 'expense';
215 | $transaction->amount = $transaction->amount * -1;
216 | } elseif ($transaction->amount > 0) {
217 | $type = 'income';
218 | }
219 | return view('transactions.createOrShowOrUpdate', [
220 | 'transaction' => $transaction,
221 | 'accounts' => $accounts->orderBy('name')->get(),
222 | 'vendors' => $vendors->orderBy('name')->get(),
223 | 'categories' => $categories->orderBy('name')->get(),
224 | 'type' => $type
225 | ]);
226 | }
227 |
228 | /**
229 | * Show the form for editing the specified resource.
230 | *
231 | * @param int $id
232 | * @return \Illuminate\Http\Response
233 | */
234 | public function edit($id)
235 | {
236 | return redirect('transactions/' . $id);
237 | }
238 |
239 | /**
240 | * Update the specified resource in storage.
241 | *
242 | * @param \Illuminate\Http\Request $request
243 | * @param Transaction $transaction
244 | * @param int $id
245 | * @return \Illuminate\Http\Response
246 | */
247 | public function update(Request $request, Transaction $transaction, $id)
248 | {
249 | $this->validate($request, [
250 | 'type' => 'required|in:expense,transfer,income',
251 | 'account' => 'required:exists:accounts,id',
252 | 'vendor' => 'required|exists:vendors,id',
253 | 'category' => 'exists:categories,id',
254 | 'description' => 'required|max:255',
255 | 'timestamp' => 'required|date_format:Y-m-d\TH:i|before:' . date('Y-m-d\TH:i'),
256 | 'amount' => 'required|numeric'
257 | ]);
258 |
259 | $input = $request->except(['_token', '_method']);
260 | if ($input['type'] == 'expense' && $input['amount'] > 0) {
261 | $input['amount'] = $input['amount'] * -1;
262 | }
263 | $input['account_id'] = $input['account'];
264 | $input['vendor_id'] = $input['vendor'];
265 | $input['category_id'] = $input['category'];
266 | $input['timestamp'] = str_replace('T', ' ', $input['timestamp']);
267 | unset($input['type'], $input['account'], $input['vendor'], $input['category']);
268 |
269 | $transaction->where('id', '=', $id)->firstOrFail()->fill($input)->save();
270 |
271 | return redirect('transactions')->with('success', 'Transaction successfully updated.');
272 | }
273 |
274 | /**
275 | * Remove the specified resource from storage.
276 | *
277 | * @param Transaction $transaction
278 | * @param int $id
279 | * @return \Illuminate\Http\Response
280 | */
281 | public function destroy(Transaction $transaction, $id)
282 | {
283 | $transaction->where('id', '=', $id)->firstOrFail()->delete();
284 | return redirect('transactions')->with('success', 'Successfully deleted transaction.');
285 | }
286 | }
287 |
--------------------------------------------------------------------------------
/resources/views/transactions/createOrShowOrUpdate.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.master')
2 |
3 | @if (isset($transaction))
4 | @section('title', 'Update ' . ucfirst($type))
5 | @else
6 | @section('title', 'New ' . ucfirst($type))
7 | @endif
8 |
9 | @section('content')
10 | @include('partials.validationErrors')
11 |
12 |