├── .editorconfig
├── .env.example
├── .gitattributes
├── .gitignore
├── .idea
├── .gitignore
├── invoice-system.iml
├── laravel-plugin.xml
├── misc.xml
├── modules.xml
├── php.xml
├── phpunit.xml
└── vcs.xml
├── .styleci.yml
├── README.md
├── app
├── Console
│ └── Kernel.php
├── Exceptions
│ └── Handler.php
├── Http
│ ├── Controllers
│ │ ├── Auth
│ │ │ ├── ConfirmPasswordController.php
│ │ │ ├── ForgotPasswordController.php
│ │ │ ├── LoginController.php
│ │ │ ├── RegisterController.php
│ │ │ ├── ResetPasswordController.php
│ │ │ └── VerificationController.php
│ │ ├── Controller.php
│ │ ├── GeneralController.php
│ │ ├── HomeController.php
│ │ └── InvoiceController.php
│ ├── Kernel.php
│ └── Middleware
│ │ ├── Authenticate.php
│ │ ├── CheckForMaintenanceMode.php
│ │ ├── EncryptCookies.php
│ │ ├── Locale.php
│ │ ├── RedirectIfAuthenticated.php
│ │ ├── TrimStrings.php
│ │ ├── TrustHosts.php
│ │ ├── TrustProxies.php
│ │ └── VerifyCsrfToken.php
├── Invoice.php
├── InvoiceDetails.php
├── Mail
│ └── SendInvoice.php
├── Providers
│ ├── AppServiceProvider.php
│ ├── AuthServiceProvider.php
│ ├── BroadcastServiceProvider.php
│ ├── EventServiceProvider.php
│ └── RouteServiceProvider.php
└── User.php
├── artisan
├── bootstrap
├── app.php
└── cache
│ └── .gitignore
├── composer.json
├── config
├── app.php
├── auth.php
├── broadcasting.php
├── cache.php
├── cors.php
├── database.php
├── filesystems.php
├── hashing.php
├── locale.php
├── logging.php
├── mail.php
├── pdf.php
├── queue.php
├── services.php
├── session.php
└── view.php
├── database
├── .gitignore
├── factories
│ └── UserFactory.php
├── migrations
│ ├── 2014_10_12_000000_create_users_table.php
│ ├── 2014_10_12_100000_create_password_resets_table.php
│ ├── 2019_08_19_000000_create_failed_jobs_table.php
│ ├── 2020_05_31_043832_create_invoices_table.php
│ └── 2020_05_31_043931_create_invoice_details_table.php
└── seeders
│ ├── DatabaseSeeder.php
│ └── InvoicesTableSeeder.php
├── package.json
├── phpunit.xml
├── public
├── .htaccess
├── css
│ └── app.css
├── favicon.ico
├── fonts
│ ├── Almarai-Bold.ttf
│ ├── Almarai-ExtraBold.ttf
│ ├── Almarai-Light.ttf
│ └── Almarai-Regular.ttf
├── frontend
│ ├── css
│ │ ├── bootstrap-rtl.css
│ │ ├── fontawesome
│ │ │ └── all.min.css
│ │ └── pickadate
│ │ │ ├── classic.css
│ │ │ ├── classic.date.css
│ │ │ ├── classic.time.css
│ │ │ └── rtl.css
│ ├── images
│ │ └── logo.png
│ ├── js
│ │ ├── custom.js
│ │ ├── fontawesome
│ │ │ └── all.min.js
│ │ ├── form_validation
│ │ │ ├── additional-methods.min.js
│ │ │ ├── jquery.form.js
│ │ │ ├── jquery.validate.min.js
│ │ │ └── messages_ar.js
│ │ └── pickadate
│ │ │ ├── ar.js
│ │ │ ├── picker.date.js
│ │ │ ├── picker.js
│ │ │ └── picker.time.js
│ └── webfonts
│ │ ├── fa-brands-400.eot
│ │ ├── fa-brands-400.svg
│ │ ├── fa-brands-400.ttf
│ │ ├── fa-brands-400.woff
│ │ ├── fa-brands-400.woff2
│ │ ├── fa-regular-400.eot
│ │ ├── fa-regular-400.svg
│ │ ├── fa-regular-400.ttf
│ │ ├── fa-regular-400.woff
│ │ ├── fa-regular-400.woff2
│ │ ├── fa-solid-900.eot
│ │ ├── fa-solid-900.svg
│ │ ├── fa-solid-900.ttf
│ │ ├── fa-solid-900.woff
│ │ └── fa-solid-900.woff2
├── index.php
├── js
│ └── app.js
├── mix-manifest.json
└── robots.txt
├── resources
├── js
│ ├── app.js
│ └── bootstrap.js
├── lang
│ ├── ar
│ │ ├── Emails
│ │ │ └── emails.php
│ │ ├── Frontend
│ │ │ └── frontend.php
│ │ ├── auth.php
│ │ ├── pagination.php
│ │ ├── passwords.php
│ │ └── validation.php
│ └── en
│ │ ├── Emails
│ │ └── emails.php
│ │ ├── Frontend
│ │ └── frontend.php
│ │ ├── auth.php
│ │ ├── pagination.php
│ │ ├── passwords.php
│ │ └── validation.php
├── sass
│ ├── _variables.scss
│ └── app.scss
└── views
│ ├── auth
│ ├── login.blade.php
│ ├── passwords
│ │ ├── confirm.blade.php
│ │ ├── email.blade.php
│ │ └── reset.blade.php
│ ├── register.blade.php
│ └── verify.blade.php
│ ├── emails
│ └── send_invoice.blade.php
│ ├── frontend
│ ├── create.blade.php
│ ├── edit.blade.php
│ ├── index.blade.php
│ ├── pdf.blade.php
│ ├── print.blade.php
│ └── show.blade.php
│ ├── home.blade.php
│ ├── layouts
│ ├── app.blade.php
│ ├── emails.blade.php
│ └── print.blade.php
│ ├── partial
│ └── flash.blade.php
│ └── welcome.blade.php
├── routes
├── api.php
├── channels.php
├── console.php
└── web.php
├── server.php
├── storage
├── app
│ ├── .gitignore
│ └── public
│ │ └── .gitignore
├── framework
│ ├── .gitignore
│ ├── cache
│ │ ├── .gitignore
│ │ └── data
│ │ │ └── .gitignore
│ ├── sessions
│ │ └── .gitignore
│ ├── testing
│ │ └── .gitignore
│ └── views
│ │ └── .gitignore
└── logs
│ └── .gitignore
├── tests
├── CreatesApplication.php
├── Feature
│ └── ExampleTest.php
├── TestCase.php
└── Unit
│ └── ExampleTest.php
└── webpack.mix.js
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | insert_final_newline = true
7 | indent_style = space
8 | indent_size = 4
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | trim_trailing_whitespace = false
13 |
14 | [*.{yml,yaml}]
15 | indent_size = 2
16 |
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
1 | APP_NAME=Laravel
2 | APP_ENV=local
3 | APP_KEY=base64:3MJe12Gws78CQZ0M6enBMQoHX+NasjNmLcu+stgr2LI=
4 | APP_DEBUG=true
5 | APP_URL=http://localhost
6 |
7 | LOG_CHANNEL=stack
8 |
9 | DB_CONNECTION=mysql
10 | DB_HOST=127.0.0.1
11 | DB_PORT=3306
12 | DB_DATABASE=course_invoices
13 | DB_USERNAME=root
14 | DB_PASSWORD=
15 |
16 | BROADCAST_DRIVER=log
17 | CACHE_DRIVER=file
18 | QUEUE_CONNECTION=sync
19 | SESSION_DRIVER=file
20 | SESSION_LIFETIME=120
21 |
22 | REDIS_HOST=127.0.0.1
23 | REDIS_PASSWORD=null
24 | REDIS_PORT=6379
25 |
26 | MAIL_MAILER=smtp
27 | MAIL_HOST=smtp.mailtrap.io
28 | MAIL_PORT=2525
29 | MAIL_USERNAME=
30 | MAIL_PASSWORD=
31 | MAIL_ENCRYPTION=tls
32 | MAIL_FROM_ADDRESS=info@invoice-system.test
33 | MAIL_FROM_NAME="${APP_NAME}"
34 |
35 | AWS_ACCESS_KEY_ID=
36 | AWS_SECRET_ACCESS_KEY=
37 | AWS_DEFAULT_REGION=us-east-1
38 | AWS_BUCKET=
39 |
40 | PUSHER_APP_ID=
41 | PUSHER_APP_KEY=
42 | PUSHER_APP_SECRET=
43 | PUSHER_APP_CLUSTER=mt1
44 |
45 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
46 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
47 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | *.css linguist-vendored
3 | *.scss linguist-vendored
4 | *.js linguist-vendored
5 | CHANGELOG.md export-ignore
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /public/hot
3 | /public/storage
4 | /storage/*.key
5 | /vendor
6 | /.idea
7 | .env
8 | .env.backup
9 | .phpunit.result.cache
10 | Homestead.json
11 | Homestead.yaml
12 | npm-debug.log
13 | yarn-error.log
14 | composer.lock
15 | package-lock.json
16 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Datasource local storage ignored files
5 | /dataSources/
6 | /dataSources.local.xml
7 | # Editor-based HTTP Client requests
8 | /httpRequests/
9 |
--------------------------------------------------------------------------------
/.idea/laravel-plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
{!! __('Emails/emails.find_an_invoice') !!}
9 | 10 | @endsection 11 | -------------------------------------------------------------------------------- /resources/views/frontend/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | @section('content') 3 |{{ __('Frontend/frontend.customer_name') }} | 17 |{{ __('Frontend/frontend.invoice_date') }} | 18 |{{ __('Frontend/frontend.total_due') }} | 19 |{{ __('Frontend/frontend.actions') }} | 20 |
---|---|---|---|
{{ $invoice->customer_name }} | 26 |{{ $invoice->invoice_date }} | 27 |{{ $invoice->total_due }} | 28 |29 | 30 | 31 | 35 | | 36 |
42 |
43 | {!! $invoices->links() !!}
44 |
45 | |
46 |
114 |
|
132 | |||||||||
136 |
|
155 | |||||||||
159 | | {{ __('Frontend/frontend.product_name') }} | 160 |{{ __('Frontend/frontend.unit') }} | 161 |{{ __('Frontend/frontend.quantity') }} | 162 |{{ __('Frontend/frontend.unit_price') }} | 163 |{{ __('Frontend/frontend.sub_total') }} | 164 |||||
{{ $loop->iteration }} | 169 |{{ $item['product_name'] }} | 170 |{{ $item['unit'] }} | 171 |{{ $item['quantity'] }} | 172 |{{ __('Frontend/frontend.sar_with_amount', ['amount' => $item['unit_price']]) }} | 173 |{{ __('Frontend/frontend.sar_with_amount', ['amount' => $item['row_sub_total']]) }} | 174 |||||
179 | | {{ __('Frontend/frontend.sub_total') }} | 180 |{{ __('Frontend/frontend.sar_with_amount', ['amount' => $sub_total]) }} | 181 ||||||||
185 | | {{ __('Frontend/frontend.discount') }} | 186 |{{ __('Frontend/frontend.sar_with_amount', ['amount' => $discount]) }} | 187 ||||||||
190 | | {{ __('Frontend/frontend.vat') }} | 191 |{{ __('Frontend/frontend.sar_with_amount', ['amount' => $vat_value]) }} | 192 ||||||||
195 | | {{ __('Frontend/frontend.shipping') }} | 196 |{{ __('Frontend/frontend.sar_with_amount', ['amount' => $shipping]) }} | 197 ||||||||
200 | | {{ __('Frontend/frontend.total_due') }} | 201 |{{ __('Frontend/frontend.sar_with_amount', ['amount' => $total_due]) }} | 202 |
{{ __('Frontend/frontend.customer_name') }} | 15 |{{ $invoice->customer_name }} | 16 |{{ __('Frontend/frontend.customer_email') }} | 17 |{{ $invoice->customer_email }} | 18 |
---|---|---|---|
{{ __('Frontend/frontend.customer_mobile') }} | 21 |{{ $invoice->customer_mobile }} | 22 |{{ __('Frontend/frontend.company_name') }} | 23 |{{ $invoice->company_name }} | 24 |
{{ __('Frontend/frontend.invoice_number') }} | 27 |{{ $invoice->invoice_number }} | 28 |{{ __('Frontend/frontend.invoice_date') }} | 29 |{{ $invoice->invoice_date }} | 30 |
39 | | {{ __('Frontend/frontend.product_name') }} | 40 |{{ __('Frontend/frontend.unit') }} | 41 |{{ __('Frontend/frontend.quantity') }} | 42 |{{ __('Frontend/frontend.unit_price') }} | 43 |{{ __('Frontend/frontend.product_subtotal') }} | 44 |
---|---|---|---|---|---|
{{ $loop->iteration }} | 50 |{{ $item->product_name }} | 51 |{{ $item->unitText() }} | 52 |{{ $item->quantity }} | 53 |{{ $item->unit_price }} | 54 |{{ $item->row_sub_total }} | 55 |
61 | | {{ __('Frontend/frontend.sub_total') }} | 62 |{{ $invoice->sub_total }} | 63 ||||
66 | | {{ __('Frontend/frontend.discount') }} | 67 |{{ $invoice->discountResult() }} | 68 ||||
71 | | {{ __('Frontend/frontend.vat') }} | 72 |{{ $invoice->vat_value }} | 73 ||||
76 | | {{ __('Frontend/frontend.shipping') }} | 77 |{{ $invoice->shippint }} | 78 ||||
81 | | {{ __('Frontend/frontend.total_due') }} | 82 |{{ $invoice->total_due }} | 83 |
{{ __('Frontend/frontend.customer_name') }} | 16 |{{ $invoice->customer_name }} | 17 |{{ __('Frontend/frontend.customer_email') }} | 18 |{{ $invoice->customer_email }} | 19 |
---|---|---|---|
{{ __('Frontend/frontend.customer_mobile') }} | 22 |{{ $invoice->customer_mobile }} | 23 |{{ __('Frontend/frontend.company_name') }} | 24 |{{ $invoice->company_name }} | 25 |
{{ __('Frontend/frontend.invoice_number') }} | 28 |{{ $invoice->invoice_number }} | 29 |{{ __('Frontend/frontend.invoice_date') }} | 30 |{{ $invoice->invoice_date }} | 31 |
40 | | {{ __('Frontend/frontend.product_name') }} | 41 |{{ __('Frontend/frontend.unit') }} | 42 |{{ __('Frontend/frontend.quantity') }} | 43 |{{ __('Frontend/frontend.unit_price') }} | 44 |{{ __('Frontend/frontend.product_subtotal') }} | 45 |
---|---|---|---|---|---|
{{ $loop->iteration }} | 51 |{{ $item->product_name }} | 52 |{{ $item->unitText() }} | 53 |{{ $item->quantity }} | 54 |{{ $item->unit_price }} | 55 |{{ $item->row_sub_total }} | 56 |
62 | | {{ __('Frontend/frontend.sub_total') }} | 63 |{{ $invoice->sub_total }} | 64 ||||
67 | | {{ __('Frontend/frontend.discount') }} | 68 |{{ $invoice->discountResult() }} | 69 ||||
72 | | {{ __('Frontend/frontend.vat') }} | 73 |{{ $invoice->vat_value }} | 74 ||||
77 | | {{ __('Frontend/frontend.shipping') }} | 78 |{{ $invoice->shippint }} | 79 ||||
82 | | {{ __('Frontend/frontend.total_due') }} | 83 |{{ $invoice->total_due }} | 84 |
28 |
|
74 |