├── .editorconfig ├── .env.example ├── .gitattributes ├── .gitignore ├── .styleci.yml ├── README.md ├── app ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Exports │ ├── CustomerExport.php │ ├── ProductExport.php │ └── UserExport.php ├── Http │ ├── Controllers │ │ ├── Auth │ │ │ ├── ConfirmPasswordController.php │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ ├── ResetPasswordController.php │ │ │ └── VerificationController.php │ │ ├── Controller.php │ │ ├── CustomerController.php │ │ ├── HomeController.php │ │ ├── InvoiceController.php │ │ ├── InvoiceDetailController.php │ │ ├── MemberController.php │ │ ├── ProductController.php │ │ ├── SettingController.php │ │ └── UserController.php │ ├── Kernel.php │ └── Middleware │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ └── VerifyCsrfToken.php ├── Models │ ├── Customer.php │ ├── Invoice.php │ ├── InvoiceDetail.php │ ├── Member.php │ ├── Product.php │ ├── Setting.php │ └── User.php ├── Policies │ ├── CustomerPolicy.php │ ├── InvoiceDetailPolicy.php │ ├── InvoicePolicy.php │ ├── MemberPolicy.php │ ├── ProductPolicy.php │ └── SettingPolicy.php └── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cors.php ├── database.php ├── dompdf.php ├── filesystems.php ├── hashing.php ├── logging.php ├── mail.php ├── queue.php ├── sanctum.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ ├── CustomerFactory.php │ ├── InvoiceDetailFactory.php │ ├── InvoiceFactory.php │ ├── MemberFactory.php │ ├── ProductFactory.php │ ├── SettingFactory.php │ └── 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 │ ├── 2019_12_14_000001_create_personal_access_tokens_table.php │ ├── 2021_11_16_113145_create_products_table.php │ ├── 2021_11_16_113916_create_customers_table.php │ ├── 2021_11_16_114001_create_invoices_table.php │ ├── 2021_11_16_114020_create_invoice_details_table.php │ ├── 2021_11_16_114144_create_members_table.php │ └── 2021_11_17_172832_create_settings_table.php └── seeders │ ├── CustomerSeeder.php │ ├── DatabaseSeeder.php │ ├── InvoiceDetailSeeder.php │ ├── InvoiceSeeder.php │ ├── MemberSeeder.php │ ├── ProductSeeder.php │ └── SettingSeeder.php ├── package-lock.json ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── assets │ ├── css │ │ ├── AdminLTE.css │ │ ├── bootstrap.css │ │ ├── bootstrap.datetimepicker.css │ │ ├── bootstrap.min.css │ │ ├── custom.css │ │ ├── datatable.bootstrap.css │ │ ├── datatable.css │ │ ├── font-awesome.min.css │ │ ├── ionicons.min.css │ │ ├── print.css │ │ ├── skin-purple.css │ │ └── styles.css │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── js │ │ ├── app.js │ │ ├── app.min.js │ │ ├── bootstrap.datetime.js │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ ├── bootstrap.password.js │ │ ├── datatable.js │ │ ├── datatables.bootstrap.js │ │ ├── jquery.min.js │ │ ├── moment.js │ │ ├── npm.js │ │ └── scripts.js ├── css │ └── app.css ├── favicon.ico ├── image │ ├── empty.png │ └── logo.png ├── index.php ├── js │ └── app.js ├── mix-manifest.json ├── robots.txt └── web.config ├── resources ├── css │ └── app.css ├── js │ ├── app.js │ └── bootstrap.js ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php ├── sass │ ├── _variables.scss │ └── app.scss └── views │ ├── FlashMessage.blade.php │ ├── admin │ ├── create.blade.php │ ├── edit.blade.php │ ├── fields.blade.php │ ├── index.blade.php │ ├── modal.blade.php │ ├── show.blade.php │ ├── table.blade.php │ └── tableContent.blade.php │ ├── auth │ ├── login.blade.php │ ├── passwords │ │ ├── confirm.blade.php │ │ ├── email.blade.php │ │ └── reset.blade.php │ ├── register.blade.php │ └── verify.blade.php │ ├── customers │ ├── create.blade.php │ ├── edit.blade.php │ ├── fields.blade.php │ ├── index.blade.php │ ├── modal.blade.php │ ├── show.blade.php │ ├── table.blade.php │ └── tableContent.blade.php │ ├── home.blade.php │ ├── invoices │ ├── create.blade.php │ ├── edit.blade.php │ ├── fields.blade.php │ ├── filters.blade.php │ ├── index.blade.php │ ├── modals.blade.php │ ├── notes.blade.php │ ├── products.blade.php │ ├── select_customer.blade.php │ ├── show.blade.php │ ├── table.blade.php │ └── tableContent.blade.php │ ├── layouts │ ├── app.blade.php │ ├── footer.blade.php │ ├── header.blade.php │ └── sidebar.blade.php │ ├── pdf │ ├── customers.blade.php │ ├── index.blade.php │ ├── products.blade.php │ └── users.blade.php │ ├── products │ ├── create.blade.php │ ├── edit.blade.php │ ├── fields.blade.php │ ├── index.blade.php │ ├── modal.blade.php │ ├── show.blade.php │ ├── table.blade.php │ └── tableContent.blade.php │ ├── settings │ ├── fields.blade.php │ └── index.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 | 17 | [docker-compose.yml] 18 | indent_size = 4 19 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | LOG_DEPRECATIONS_CHANNEL=null 9 | LOG_LEVEL=debug 10 | 11 | DB_CONNECTION=mysql 12 | DB_HOST=127.0.0.1 13 | DB_PORT=3306 14 | DB_DATABASE=laravel_invoice_management 15 | DB_USERNAME=root 16 | DB_PASSWORD= 17 | 18 | BROADCAST_DRIVER=log 19 | CACHE_DRIVER=file 20 | FILESYSTEM_DRIVER=local 21 | QUEUE_CONNECTION=sync 22 | SESSION_DRIVER=file 23 | SESSION_LIFETIME=120 24 | 25 | MEMCACHED_HOST=127.0.0.1 26 | 27 | REDIS_HOST=127.0.0.1 28 | REDIS_PASSWORD=null 29 | REDIS_PORT=6379 30 | 31 | MAIL_MAILER=smtp 32 | MAIL_HOST=mailhog 33 | MAIL_PORT=1025 34 | MAIL_USERNAME=null 35 | MAIL_PASSWORD=null 36 | MAIL_ENCRYPTION=null 37 | MAIL_FROM_ADDRESS=null 38 | MAIL_FROM_NAME="${APP_NAME}" 39 | 40 | AWS_ACCESS_KEY_ID= 41 | AWS_SECRET_ACCESS_KEY= 42 | AWS_DEFAULT_REGION=us-east-1 43 | AWS_BUCKET= 44 | AWS_USE_PATH_STYLE_ENDPOINT=false 45 | 46 | PUSHER_APP_ID= 47 | PUSHER_APP_KEY= 48 | PUSHER_APP_SECRET= 49 | PUSHER_APP_CLUSTER=mt1 50 | 51 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 52 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 53 | -------------------------------------------------------------------------------- /.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 | .env 7 | .env.backup 8 | .phpunit.result.cache 9 | docker-compose.override.yml 10 | Homestead.json 11 | Homestead.yaml 12 | npm-debug.log 13 | yarn-error.log 14 | /.idea 15 | /.vscode 16 | -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | version: 8 4 | disabled: 5 | - no_unused_imports 6 | finder: 7 | not-name: 8 | - index.php 9 | - server.php 10 | js: 11 | finder: 12 | not-name: 13 | - webpack.mix.js 14 | css: true 15 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 28 | } 29 | 30 | /** 31 | * Register the commands for the application. 32 | * 33 | * @return void 34 | */ 35 | protected function commands() 36 | { 37 | $this->load(__DIR__.'/Commands'); 38 | 39 | require base_path('routes/console.php'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | reportable(function (Throwable $e) { 38 | // 39 | }); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Exports/CustomerExport.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('logout'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 42 | } 43 | 44 | /** 45 | * Get a validator for an incoming registration request. 46 | * 47 | * @param array $data 48 | * @return \Illuminate\Contracts\Validation\Validator 49 | */ 50 | protected function validator(array $data) 51 | { 52 | return Validator::make($data, [ 53 | 'name' => ['required', 'string', 'max:255'], 54 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 55 | 'password' => ['required', 'string', 'min:8', 'confirmed'], 56 | ]); 57 | } 58 | 59 | /** 60 | * Create a new user instance after a valid registration. 61 | * 62 | * @param array $data 63 | * @return \App\Models\User 64 | */ 65 | protected function create(array $data) 66 | { 67 | return User::create([ 68 | 'name' => $data['name'], 69 | 'email' => $data['email'], 70 | 'password' => Hash::make($data['password']), 71 | ]); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 39 | $this->middleware('signed')->only('verify'); 40 | $this->middleware('throttle:6,1')->only('verify', 'resend'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | setting = Setting::first(); 19 | } 20 | 21 | 22 | public function index(Request $request) 23 | { 24 | if ($request->ajax()) { 25 | return response()->json(['view' =>view('customers.tableContent', ['customers' => Customer::get()])->render()]); 26 | } 27 | 28 | if ($request->pdf) { 29 | $pdf = PDF::loadView('pdf.customers', ['customers' => Customer::get(), 'setting' => $this->setting]); 30 | return $pdf->download('customers_list.pdf'); 31 | } 32 | return view('customers.index', ['customers' => Customer::get()]); 33 | } 34 | 35 | 36 | public function create() 37 | { 38 | return view('customers.create'); 39 | } 40 | 41 | 42 | public function store(Request $request) 43 | { 44 | // dd($request->all()); 45 | Customer::updateOrCreate(['id' => $request->customer_id], [ 46 | 'name' => $request->name, 47 | 'email' => $request->email, 48 | 'phone' => $request->phone, 49 | 'address_1' => $request->address_1, 50 | 'city' => $request->city, 51 | 'post_code' => $request->postcode, 52 | 'address_2' => $request->address_2, 53 | 'country' => $request->country, 54 | 55 | 'ship_name' => $request->ship_name, 56 | 'ship_email' => $request->ship_email, 57 | 'ship_phone' => $request->ship_phone, 58 | 'ship_address_1' => $request->ship_address_1, 59 | 'ship_city' => $request->ship_city, 60 | 'ship_post_code' => $request->ship_postcode, 61 | 'ship_address_2' => $request->ship_address_2, 62 | 'ship_country' => $request->ship_country, 63 | 64 | ]); 65 | 66 | if ($request->ajax()) { 67 | return response()->json(['success' => $request->customer_id ? 'Customer Updated successfully' : 'Customer Created successfully', 'status' => 'Status 200 ']); 68 | }else { 69 | return redirect()->route('customers.index')->with('success', $request->customer_id ? 'Customer Updated successfully' : 'Customer Created successfully'); 70 | } 71 | 72 | } 73 | 74 | 75 | public function edit(Customer $customer) 76 | { 77 | return view('customers.edit', ['customer' => $customer]); 78 | } 79 | 80 | 81 | public function show(Customer $customer) 82 | { 83 | $pdf = PDF::loadView('pdf.customers', ['customer' => $customer, 'setting' => $this->setting]); 84 | return $pdf->download('invoice.pdf'); 85 | } 86 | 87 | 88 | public function destroy(Customer $customer, Request $request) 89 | { 90 | if (!Hash::check($request->password, auth()->user()->password)) { 91 | return response()->json(['not_valid' => 'Password not valid']); 92 | } 93 | try { 94 | $customer->delete(); 95 | return response()->json(['success' => 'Customer Deleted Successfully']); 96 | } catch (\Throwable $th) { 97 | return response()->json(['error' => 'Customer Not Deleted Fail']); 98 | } 99 | } 100 | 101 | public function export() 102 | { 103 | try { 104 | return Excel::download(new CustomerExport, 'customers_list.xlsx'); 105 | } catch (\Throwable $th) { 106 | return redirect()->back()->with('error', $th->getMessage()); 107 | } 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /app/Http/Controllers/HomeController.php: -------------------------------------------------------------------------------- 1 | Product::count(), 18 | 'totalUsers' => User::count(), 19 | 'totalCustomers' => Customer::count(), 20 | 'totalInvoices' => Invoice::count(), 21 | 'totalPaidBill' => Invoice::where('status', 'paid')->count(), 22 | 'totalPendingBill' => Invoice::where('status', 'open')->count(), 23 | 'totalDueBill' => Invoice::whereDate('invoice_due_date', '<', now())->count(), 24 | 'totalAmount' => Invoice::sum('subtotal')] 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Http/Controllers/InvoiceDetailController.php: -------------------------------------------------------------------------------- 1 | setting = Setting::first(); 20 | } 21 | 22 | public function index(Request $request) 23 | { 24 | if ($request->ajax()) { 25 | return response()->json(['view' =>view('products.tableContent', ['products' => Product::get()])->render()]); 26 | } 27 | 28 | if ($request->pdf) { 29 | $pdf = PDF::loadView('pdf.products', ['products' => Product::get(), 'setting' => $this->setting]); 30 | return $pdf->download('products_list.pdf'); 31 | } 32 | 33 | return view('products.index', ['products' => Product::get(), 'setting' => $this->setting]); 34 | } 35 | 36 | 37 | public function create() 38 | { 39 | return view('products.create'); 40 | } 41 | 42 | 43 | public function store(Request $request) 44 | { 45 | Product::updateOrCreate(['id' => $request->product_id], [ 46 | 'product_name' => $request->product_name, 47 | 'product_qty' => $request->product_qty, 48 | 'product_price' => $request->product_price, 49 | 'product_desc' => $request->product_desc, 50 | ]); 51 | 52 | if ($request->ajax()) { 53 | return response()->json(['success' => $request->product_id ? 'Product Updated successfully' : 'Product Created successfully', 'status' => 'Status 200 ']); 54 | }else { 55 | return redirect()->route('products.index')->with('success', $request->product_id ? 'Product Updated successfully' : 'Product Created successfully'); 56 | } 57 | } 58 | 59 | 60 | public function edit(Product $product) 61 | { 62 | return view('products.edit', ['product' => $product, 'setting' => $this->setting]); 63 | } 64 | 65 | public function destroy(Product $product, Request $request) 66 | { 67 | if (!Hash::check($request->password, auth()->user()->password)) { 68 | return response()->json(['not_valid' => 'Password not valid']); 69 | } 70 | try { 71 | $product->delete(); 72 | return response()->json(['success' => 'Product Deleted Successfully']); 73 | } catch (\Throwable $th) { 74 | return response()->json(['error' => 'Product Not Deleted Fail']); 75 | } 76 | } 77 | 78 | 79 | public function export() 80 | { 81 | try { 82 | return Excel::download(new ProductExport, 'products_list.xlsx'); 83 | } catch (\Throwable $th) { 84 | return redirect()->back()->with('error', $th->getMessage()); 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /app/Http/Controllers/SettingController.php: -------------------------------------------------------------------------------- 1 | Setting::first()]); 14 | } 15 | 16 | public function store(Request $request) 17 | { 18 | Setting::updateOrCreate(['id' => $request->setting_id], 19 | $request->except('setting_id') 20 | ); 21 | 22 | return redirect()->route('setting.index')->with('success', 'Setting Created or Updated Successfully'); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Http/Controllers/UserController.php: -------------------------------------------------------------------------------- 1 | setting = Setting::first(); 21 | } 22 | 23 | 24 | public function index(Request $request) 25 | { 26 | if ($request->ajax()) { 27 | return response()->json(['view' =>view('admin.tableContent', ['users' => User::get()])->render()]); 28 | } 29 | 30 | if ($request->pdf) { 31 | $pdf = PDF::loadView('pdf.users', ['users' => User::get(), 'setting' => $this->setting]); 32 | return $pdf->download('users_list.pdf'); 33 | } 34 | 35 | return view('admin.index', ['users' => User::get()]); 36 | } 37 | 38 | public function create() 39 | { 40 | return view('admin.create'); 41 | } 42 | 43 | 44 | public function store(Request $request) 45 | { 46 | User::updateOrCreate(['id' => $request->user_id], [ 47 | 'name' => $request->name, 48 | 'email' => $request->email, 49 | 'phone' => $request->phone, 50 | 'username' => $request->username, 51 | 'password' => $request->password, 52 | ]); 53 | 54 | if ($request->ajax()) { 55 | return response()->json(['success' => $request->user_id ? 'User Updated successfully' : 'User Created successfully', 'status' => 'Status 200 ']); 56 | }else { 57 | return redirect()->route('user.index')->with('success', $request->user_id ? 'User Updated successfully' : 'User Created successfully'); 58 | } 59 | } 60 | 61 | public function edit(User $user) 62 | { 63 | return view('admin.edit', ['user' => $user]); 64 | } 65 | 66 | public function destroy(User $user, Request $request) 67 | { 68 | if (!Hash::check($request->password, auth()->user()->password)) { 69 | return response()->json(['not_valid' => 'Password not valid']); 70 | } 71 | try { 72 | $user->delete(); 73 | return response()->json(['success' => 'User Deleted Successfully']); 74 | } catch (\Throwable $th) { 75 | return response()->json(['error' => 'User Not Deleted Fail']); 76 | } 77 | } 78 | 79 | public function export() 80 | { 81 | try { 82 | return Excel::download(new UserExport, 'users_list.xlsx'); 83 | } catch (\Throwable $th) { 84 | return redirect()->back()->with('error', $th->getMessage()); 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 33 | \App\Http\Middleware\EncryptCookies::class, 34 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 35 | \Illuminate\Session\Middleware\StartSession::class, 36 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 37 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 38 | \App\Http\Middleware\VerifyCsrfToken::class, 39 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 40 | ], 41 | 42 | 'api' => [ 43 | // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, 44 | 'throttle:api', 45 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 46 | ], 47 | ]; 48 | 49 | /** 50 | * The application's route middleware. 51 | * 52 | * These middleware may be assigned to groups or used individually. 53 | * 54 | * @var array 55 | */ 56 | protected $routeMiddleware = [ 57 | 'auth' => \App\Http\Middleware\Authenticate::class, 58 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 59 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 60 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 61 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 62 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 63 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 64 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 65 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 66 | ]; 67 | } 68 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 26 | return redirect(RouteServiceProvider::HOME); 27 | } 28 | } 29 | 30 | return $next($request); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | 'datetime', 30 | 'invoice_due_date'=> 'datetime', 31 | ]; 32 | 33 | /** 34 | * Get the user that owns the Invoice 35 | * 36 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo 37 | */ 38 | public function customer(): BelongsTo 39 | { 40 | return $this->belongsTo(Customer::class, 'email', 'email'); 41 | } 42 | 43 | /** 44 | * Get all of the comments for the Invoice 45 | * 46 | * @return \Illuminate\Database\Eloquent\Relations\HasMany 47 | */ 48 | public function invoiceDetails(): HasMany 49 | { 50 | return $this->hasMany(InvoiceDetail::class, 'invoice_id', 'id'); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/Models/InvoiceDetail.php: -------------------------------------------------------------------------------- 1 | belongsTo(Product::class, 'product_id', 'id'); 31 | } 32 | 33 | public function products(): HasMany 34 | { 35 | return $this->hasMany(Product::class, 'product_id', 'id'); 36 | } 37 | 38 | /** 39 | * Get the user that owns the InvoiceDetail 40 | * 41 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo 42 | */ 43 | public function invoice(): BelongsTo 44 | { 45 | return $this->belongsTo(Invoice::class, 'invoice_id', 'id'); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /app/Models/Member.php: -------------------------------------------------------------------------------- 1 | 'datetime', 45 | ]; 46 | } 47 | -------------------------------------------------------------------------------- /app/Policies/CustomerPolicy.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | * 26 | * @return void 27 | */ 28 | public function boot() 29 | { 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | configureRateLimiting(); 39 | 40 | $this->routes(function () { 41 | Route::prefix('api') 42 | ->middleware('api') 43 | ->namespace($this->namespace) 44 | ->group(base_path('routes/api.php')); 45 | 46 | Route::middleware('web') 47 | ->namespace($this->namespace) 48 | ->group(base_path('routes/web.php')); 49 | }); 50 | } 51 | 52 | /** 53 | * Configure the rate limiters for the application. 54 | * 55 | * @return void 56 | */ 57 | protected function configureRateLimiting() 58 | { 59 | RateLimiter::for('api', function (Request $request) { 60 | return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); 61 | }); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": ["framework", "laravel"], 6 | "license": "MIT", 7 | "require": { 8 | "php": "^7.3|^8.0", 9 | "barryvdh/laravel-dompdf": "^0.9.0", 10 | "fruitcake/laravel-cors": "^2.0", 11 | "guzzlehttp/guzzle": "^7.0.1", 12 | "laravel/framework": "^8.65", 13 | "laravel/sanctum": "^2.11", 14 | "laravel/tinker": "^2.5", 15 | "laravel/ui": "^3.3", 16 | "maatwebsite/excel": "^3.1" 17 | }, 18 | "require-dev": { 19 | "facade/ignition": "^2.5", 20 | "fakerphp/faker": "^1.9.1", 21 | "laravel/sail": "^1.0.1", 22 | "mockery/mockery": "^1.4.4", 23 | "nunomaduro/collision": "^5.10", 24 | "phpunit/phpunit": "^9.5.10" 25 | }, 26 | "autoload": { 27 | "psr-4": { 28 | "App\\": "app/", 29 | "Database\\Factories\\": "database/factories/", 30 | "Database\\Seeders\\": "database/seeders/" 31 | } 32 | }, 33 | "autoload-dev": { 34 | "psr-4": { 35 | "Tests\\": "tests/" 36 | } 37 | }, 38 | "scripts": { 39 | "post-autoload-dump": [ 40 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 41 | "@php artisan package:discover --ansi" 42 | ], 43 | "post-update-cmd": [ 44 | "@php artisan vendor:publish --tag=laravel-assets --ansi" 45 | ], 46 | "post-root-package-install": [ 47 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 48 | ], 49 | "post-create-project-cmd": [ 50 | "@php artisan key:generate --ansi" 51 | ] 52 | }, 53 | "extra": { 54 | "laravel": { 55 | "dont-discover": [] 56 | } 57 | }, 58 | "config": { 59 | "optimize-autoloader": true, 60 | "preferred-install": "dist", 61 | "sort-packages": true 62 | }, 63 | "minimum-stability": "dev", 64 | "prefer-stable": true 65 | } 66 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | ], 44 | 45 | /* 46 | |-------------------------------------------------------------------------- 47 | | User Providers 48 | |-------------------------------------------------------------------------- 49 | | 50 | | All authentication drivers have a user provider. This defines how the 51 | | users are actually retrieved out of your database or other storage 52 | | mechanisms used by this application to persist your user's data. 53 | | 54 | | If you have multiple user tables or models you may configure multiple 55 | | sources which represent each model / table. These sources may then 56 | | be assigned to any extra authentication guards you have defined. 57 | | 58 | | Supported: "database", "eloquent" 59 | | 60 | */ 61 | 62 | 'providers' => [ 63 | 'users' => [ 64 | 'driver' => 'eloquent', 65 | 'model' => App\Models\User::class, 66 | ], 67 | 68 | // 'users' => [ 69 | // 'driver' => 'database', 70 | // 'table' => 'users', 71 | // ], 72 | ], 73 | 74 | /* 75 | |-------------------------------------------------------------------------- 76 | | Resetting Passwords 77 | |-------------------------------------------------------------------------- 78 | | 79 | | You may specify multiple password reset configurations if you have more 80 | | than one user table or model in the application and you want to have 81 | | separate password reset settings based on the specific user types. 82 | | 83 | | The expire time is the number of minutes that the reset token should be 84 | | considered valid. This security feature keeps tokens short-lived so 85 | | they have less time to be guessed. You may change this as needed. 86 | | 87 | */ 88 | 89 | 'passwords' => [ 90 | 'users' => [ 91 | 'provider' => 'users', 92 | 'table' => 'password_resets', 93 | 'expire' => 60, 94 | 'throttle' => 60, 95 | ], 96 | ], 97 | 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Password Confirmation Timeout 101 | |-------------------------------------------------------------------------- 102 | | 103 | | Here you may define the amount of seconds before a password confirmation 104 | | times out and the user is prompted to re-enter their password via the 105 | | confirmation screen. By default, the timeout lasts for three hours. 106 | | 107 | */ 108 | 109 | 'password_timeout' => 10800, 110 | 111 | ]; 112 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'useTLS' => true, 41 | ], 42 | ], 43 | 44 | 'ably' => [ 45 | 'driver' => 'ably', 46 | 'key' => env('ABLY_KEY'), 47 | ], 48 | 49 | 'redis' => [ 50 | 'driver' => 'redis', 51 | 'connection' => 'default', 52 | ], 53 | 54 | 'log' => [ 55 | 'driver' => 'log', 56 | ], 57 | 58 | 'null' => [ 59 | 'driver' => 'null', 60 | ], 61 | 62 | ], 63 | 64 | ]; 65 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | | Supported drivers: "apc", "array", "database", "file", 30 | | "memcached", "redis", "dynamodb", "octane", "null" 31 | | 32 | */ 33 | 34 | 'stores' => [ 35 | 36 | 'apc' => [ 37 | 'driver' => 'apc', 38 | ], 39 | 40 | 'array' => [ 41 | 'driver' => 'array', 42 | 'serialize' => false, 43 | ], 44 | 45 | 'database' => [ 46 | 'driver' => 'database', 47 | 'table' => 'cache', 48 | 'connection' => null, 49 | 'lock_connection' => null, 50 | ], 51 | 52 | 'file' => [ 53 | 'driver' => 'file', 54 | 'path' => storage_path('framework/cache/data'), 55 | ], 56 | 57 | 'memcached' => [ 58 | 'driver' => 'memcached', 59 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 60 | 'sasl' => [ 61 | env('MEMCACHED_USERNAME'), 62 | env('MEMCACHED_PASSWORD'), 63 | ], 64 | 'options' => [ 65 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 66 | ], 67 | 'servers' => [ 68 | [ 69 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 70 | 'port' => env('MEMCACHED_PORT', 11211), 71 | 'weight' => 100, 72 | ], 73 | ], 74 | ], 75 | 76 | 'redis' => [ 77 | 'driver' => 'redis', 78 | 'connection' => 'cache', 79 | 'lock_connection' => 'default', 80 | ], 81 | 82 | 'dynamodb' => [ 83 | 'driver' => 'dynamodb', 84 | 'key' => env('AWS_ACCESS_KEY_ID'), 85 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 86 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 87 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 88 | 'endpoint' => env('DYNAMODB_ENDPOINT'), 89 | ], 90 | 91 | 'octane' => [ 92 | 'driver' => 'octane', 93 | ], 94 | 95 | ], 96 | 97 | /* 98 | |-------------------------------------------------------------------------- 99 | | Cache Key Prefix 100 | |-------------------------------------------------------------------------- 101 | | 102 | | When utilizing a RAM based store such as APC or Memcached, there might 103 | | be other applications utilizing the same cache. So, we'll specify a 104 | | value to get prefixed to all our keys so we can avoid collisions. 105 | | 106 | */ 107 | 108 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), 109 | 110 | ]; 111 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*', 'sanctum/csrf-cookie'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Filesystem Disks 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure as many filesystem "disks" as you wish, and you 24 | | may even configure multiple disks of the same driver. Defaults have 25 | | been setup for each driver as an example of the required options. 26 | | 27 | | Supported Drivers: "local", "ftp", "sftp", "s3" 28 | | 29 | */ 30 | 31 | 'disks' => [ 32 | 33 | 'local' => [ 34 | 'driver' => 'local', 35 | 'root' => storage_path('app'), 36 | ], 37 | 38 | 'public' => [ 39 | 'driver' => 'local', 40 | 'root' => storage_path('app/public'), 41 | 'url' => env('APP_URL').'/storage', 42 | 'visibility' => 'public', 43 | ], 44 | 45 | 's3' => [ 46 | 'driver' => 's3', 47 | 'key' => env('AWS_ACCESS_KEY_ID'), 48 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 49 | 'region' => env('AWS_DEFAULT_REGION'), 50 | 'bucket' => env('AWS_BUCKET'), 51 | 'url' => env('AWS_URL'), 52 | 'endpoint' => env('AWS_ENDPOINT'), 53 | 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), 54 | ], 55 | 56 | ], 57 | 58 | /* 59 | |-------------------------------------------------------------------------- 60 | | Symbolic Links 61 | |-------------------------------------------------------------------------- 62 | | 63 | | Here you may configure the symbolic links that will be created when the 64 | | `storage:link` Artisan command is executed. The array keys should be 65 | | the locations of the links and the values should be their targets. 66 | | 67 | */ 68 | 69 | 'links' => [ 70 | public_path('storage') => storage_path('app/public'), 71 | ], 72 | 73 | ]; 74 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 1024, 48 | 'threads' => 2, 49 | 'time' => 2, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 21 | 22 | /* 23 | |-------------------------------------------------------------------------- 24 | | Deprecations Log Channel 25 | |-------------------------------------------------------------------------- 26 | | 27 | | This option controls the log channel that should be used to log warnings 28 | | regarding deprecated PHP and library features. This allows you to get 29 | | your application ready for upcoming major versions of dependencies. 30 | | 31 | */ 32 | 33 | 'deprecations' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Log Channels 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may configure the log channels for your application. Out of 41 | | the box, Laravel uses the Monolog PHP logging library. This gives 42 | | you a variety of powerful log handlers / formatters to utilize. 43 | | 44 | | Available Drivers: "single", "daily", "slack", "syslog", 45 | | "errorlog", "monolog", 46 | | "custom", "stack" 47 | | 48 | */ 49 | 50 | 'channels' => [ 51 | 'stack' => [ 52 | 'driver' => 'stack', 53 | 'channels' => ['single'], 54 | 'ignore_exceptions' => false, 55 | ], 56 | 57 | 'single' => [ 58 | 'driver' => 'single', 59 | 'path' => storage_path('logs/laravel.log'), 60 | 'level' => env('LOG_LEVEL', 'debug'), 61 | ], 62 | 63 | 'daily' => [ 64 | 'driver' => 'daily', 65 | 'path' => storage_path('logs/laravel.log'), 66 | 'level' => env('LOG_LEVEL', 'debug'), 67 | 'days' => 14, 68 | ], 69 | 70 | 'slack' => [ 71 | 'driver' => 'slack', 72 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 73 | 'username' => 'Laravel Log', 74 | 'emoji' => ':boom:', 75 | 'level' => env('LOG_LEVEL', 'critical'), 76 | ], 77 | 78 | 'papertrail' => [ 79 | 'driver' => 'monolog', 80 | 'level' => env('LOG_LEVEL', 'debug'), 81 | 'handler' => SyslogUdpHandler::class, 82 | 'handler_with' => [ 83 | 'host' => env('PAPERTRAIL_URL'), 84 | 'port' => env('PAPERTRAIL_PORT'), 85 | ], 86 | ], 87 | 88 | 'stderr' => [ 89 | 'driver' => 'monolog', 90 | 'level' => env('LOG_LEVEL', 'debug'), 91 | 'handler' => StreamHandler::class, 92 | 'formatter' => env('LOG_STDERR_FORMATTER'), 93 | 'with' => [ 94 | 'stream' => 'php://stderr', 95 | ], 96 | ], 97 | 98 | 'syslog' => [ 99 | 'driver' => 'syslog', 100 | 'level' => env('LOG_LEVEL', 'debug'), 101 | ], 102 | 103 | 'errorlog' => [ 104 | 'driver' => 'errorlog', 105 | 'level' => env('LOG_LEVEL', 'debug'), 106 | ], 107 | 108 | 'null' => [ 109 | 'driver' => 'monolog', 110 | 'handler' => NullHandler::class, 111 | ], 112 | 113 | 'emergency' => [ 114 | 'path' => storage_path('logs/laravel.log'), 115 | ], 116 | ], 117 | 118 | ]; 119 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_MAILER', 'smtp'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Mailer Configurations 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure all of the mailers used by your application plus 24 | | their respective settings. Several examples have been configured for 25 | | you and you are free to add your own as your application requires. 26 | | 27 | | Laravel supports a variety of mail "transport" drivers to be used while 28 | | sending an e-mail. You will specify which one you are using for your 29 | | mailers below. You are free to add additional mailers as required. 30 | | 31 | | Supported: "smtp", "sendmail", "mailgun", "ses", 32 | | "postmark", "log", "array", "failover" 33 | | 34 | */ 35 | 36 | 'mailers' => [ 37 | 'smtp' => [ 38 | 'transport' => 'smtp', 39 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 40 | 'port' => env('MAIL_PORT', 587), 41 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 42 | 'username' => env('MAIL_USERNAME'), 43 | 'password' => env('MAIL_PASSWORD'), 44 | 'timeout' => null, 45 | 'auth_mode' => null, 46 | ], 47 | 48 | 'ses' => [ 49 | 'transport' => 'ses', 50 | ], 51 | 52 | 'mailgun' => [ 53 | 'transport' => 'mailgun', 54 | ], 55 | 56 | 'postmark' => [ 57 | 'transport' => 'postmark', 58 | ], 59 | 60 | 'sendmail' => [ 61 | 'transport' => 'sendmail', 62 | 'path' => '/usr/sbin/sendmail -bs', 63 | ], 64 | 65 | 'log' => [ 66 | 'transport' => 'log', 67 | 'channel' => env('MAIL_LOG_CHANNEL'), 68 | ], 69 | 70 | 'array' => [ 71 | 'transport' => 'array', 72 | ], 73 | 74 | 'failover' => [ 75 | 'transport' => 'failover', 76 | 'mailers' => [ 77 | 'smtp', 78 | 'log', 79 | ], 80 | ], 81 | ], 82 | 83 | /* 84 | |-------------------------------------------------------------------------- 85 | | Global "From" Address 86 | |-------------------------------------------------------------------------- 87 | | 88 | | You may wish for all e-mails sent by your application to be sent from 89 | | the same address. Here, you may specify a name and address that is 90 | | used globally for all e-mails that are sent by your application. 91 | | 92 | */ 93 | 94 | 'from' => [ 95 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 96 | 'name' => env('MAIL_FROM_NAME', 'Example'), 97 | ], 98 | 99 | /* 100 | |-------------------------------------------------------------------------- 101 | | Markdown Mail Settings 102 | |-------------------------------------------------------------------------- 103 | | 104 | | If you are using Markdown based email rendering, you may configure your 105 | | theme and component paths here, allowing you to customize the design 106 | | of the emails. Or, you may simply stick with the Laravel defaults! 107 | | 108 | */ 109 | 110 | 'markdown' => [ 111 | 'theme' => 'default', 112 | 113 | 'paths' => [ 114 | resource_path('views/vendor/mail'), 115 | ], 116 | ], 117 | 118 | ]; 119 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'sync'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection information for each server that 24 | | is used by your application. A default configuration has been added 25 | | for each back-end shipped with Laravel. You are free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | 'after_commit' => false, 43 | ], 44 | 45 | 'beanstalkd' => [ 46 | 'driver' => 'beanstalkd', 47 | 'host' => 'localhost', 48 | 'queue' => 'default', 49 | 'retry_after' => 90, 50 | 'block_for' => 0, 51 | 'after_commit' => false, 52 | ], 53 | 54 | 'sqs' => [ 55 | 'driver' => 'sqs', 56 | 'key' => env('AWS_ACCESS_KEY_ID'), 57 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 58 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 59 | 'queue' => env('SQS_QUEUE', 'default'), 60 | 'suffix' => env('SQS_SUFFIX'), 61 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 62 | 'after_commit' => false, 63 | ], 64 | 65 | 'redis' => [ 66 | 'driver' => 'redis', 67 | 'connection' => 'default', 68 | 'queue' => env('REDIS_QUEUE', 'default'), 69 | 'retry_after' => 90, 70 | 'block_for' => null, 71 | 'after_commit' => false, 72 | ], 73 | 74 | ], 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | Failed Queue Jobs 79 | |-------------------------------------------------------------------------- 80 | | 81 | | These options configure the behavior of failed queue job logging so you 82 | | can control which database and table are used to store the jobs that 83 | | have failed. You may change them to any database / table you wish. 84 | | 85 | */ 86 | 87 | 'failed' => [ 88 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 89 | 'database' => env('DB_CONNECTION', 'mysql'), 90 | 'table' => 'failed_jobs', 91 | ], 92 | 93 | ]; 94 | -------------------------------------------------------------------------------- /config/sanctum.php: -------------------------------------------------------------------------------- 1 | explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( 17 | '%s%s', 18 | 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', 19 | env('APP_URL') ? ','.parse_url(env('APP_URL'), PHP_URL_HOST) : '' 20 | ))), 21 | 22 | /* 23 | |-------------------------------------------------------------------------- 24 | | Expiration Minutes 25 | |-------------------------------------------------------------------------- 26 | | 27 | | This value controls the number of minutes until an issued token will be 28 | | considered expired. If this value is null, personal access tokens do 29 | | not expire. This won't tweak the lifetime of first-party sessions. 30 | | 31 | */ 32 | 33 | 'expiration' => null, 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Sanctum Middleware 38 | |-------------------------------------------------------------------------- 39 | | 40 | | When authenticating your first-party SPA with Sanctum you may need to 41 | | customize some of the middleware Sanctum uses while processing the 42 | | request. You may change the middleware listed below as required. 43 | | 44 | */ 45 | 46 | 'middleware' => [ 47 | 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, 48 | 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, 49 | ], 50 | 51 | ]; 52 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 31 | ], 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /database/factories/CustomerFactory.php: -------------------------------------------------------------------------------- 1 | $this->faker->name(), 19 | 'email' => $this->faker->unique()->safeEmail(), 20 | 'email_verified_at' => now(), 21 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 22 | 'remember_token' => Str::random(10), 23 | ]; 24 | } 25 | 26 | /** 27 | * Indicate that the model's email address should be unverified. 28 | * 29 | * @return \Illuminate\Database\Eloquent\Factories\Factory 30 | */ 31 | public function unverified() 32 | { 33 | return $this->state(function (array $attributes) { 34 | return [ 35 | 'email_verified_at' => null, 36 | ]; 37 | }); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->string('username')->nullable(); 20 | $table->string('phone')->nullable(); 21 | $table->string('email')->unique(); 22 | $table->timestamp('email_verified_at')->nullable(); 23 | $table->string('password'); 24 | $table->rememberToken(); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('users'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2019_08_19_000000_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('uuid')->unique(); 19 | $table->text('connection'); 20 | $table->text('queue'); 21 | $table->longText('payload'); 22 | $table->longText('exception'); 23 | $table->timestamp('failed_at')->useCurrent(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('failed_jobs'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->morphs('tokenable'); 19 | $table->string('name'); 20 | $table->string('token', 64)->unique(); 21 | $table->text('abilities')->nullable(); 22 | $table->timestamp('last_used_at')->nullable(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('personal_access_tokens'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2021_11_16_113145_create_products_table.php: -------------------------------------------------------------------------------- 1 | id(); 14 | $table->text('product_name')->nullable(); 15 | $table->integer('product_qty')->nullable(); 16 | $table->text('product_desc')->nullable(); 17 | $table->integer('product_price')->nullable(); 18 | $table->timestamps(); 19 | }); 20 | } 21 | 22 | public function down() 23 | { 24 | Schema::dropIfExists('products'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /database/migrations/2021_11_16_113916_create_customers_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name')->nullable(); 19 | $table->string('phone')->nullable(); 20 | $table->string('email')->unique(); 21 | $table->string('address_1')->unique(); 22 | $table->string('address_2')->unique(); 23 | $table->string('city')->unique(); 24 | $table->string('country')->unique(); 25 | $table->string('post_code')->unique(); 26 | 27 | $table->string('ship_name')->nullable(); 28 | $table->string('ship_phone')->nullable(); 29 | $table->string('ship_email')->nullable(); 30 | $table->string('ship_address_1')->unique(); 31 | $table->string('ship_address_2')->unique(); 32 | $table->string('ship_city')->unique(); 33 | $table->string('ship_country')->unique(); 34 | $table->string('ship_post_code')->unique(); 35 | $table->timestamps(); 36 | }); 37 | } 38 | 39 | /** 40 | * Reverse the migrations. 41 | * 42 | * @return void 43 | */ 44 | public function down() 45 | { 46 | Schema::dropIfExists('customers'); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /database/migrations/2021_11_16_114001_create_invoices_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('email')->nullable(); 19 | $table->date('invoice_date')->nullable(); 20 | $table->date('invoice_due_date')->nullable(); 21 | $table->decimal('subtotal', 2)->default(0); 22 | $table->decimal('shipping', 2)->default(0); 23 | $table->decimal('discount', 2)->default(0); 24 | $table->decimal('vat', 2)->default(0); 25 | $table->decimal('total', 2)->default(0); 26 | $table->text('notes')->nullable(); 27 | $table->string('invoice_type')->nullable(); 28 | $table->string('status')->default(0); 29 | $table->timestamps(); 30 | }); 31 | } 32 | 33 | /** 34 | * Reverse the migrations. 35 | * 36 | * @return void 37 | */ 38 | public function down() 39 | { 40 | Schema::dropIfExists('invoices'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /database/migrations/2021_11_16_114020_create_invoice_details_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->foreignId('invoice_id')->nullable()->constrained('invoices')->onDelete('cascade')->onUpdate('cascade'); 19 | $table->foreignId('product_id')->nullable()->constrained('products')->onDelete('cascade')->onUpdate('cascade'); 20 | $table->integer('qty')->default(0); 21 | $table->integer('price')->default(0); 22 | $table->decimal('discount', 2)->default(0); 23 | $table->decimal('subtotal', 2)->default(0); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('invoice_details'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2021_11_16_114144_create_members_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name')->nullable(); 19 | $table->string('phone')->nullable(); 20 | $table->string('email')->unique(); 21 | $table->string('address_1')->unique(); 22 | $table->string('address_2')->unique(); 23 | $table->string('city')->unique(); 24 | $table->string('country')->unique(); 25 | $table->string('post_code')->unique(); 26 | 27 | $table->string('ship_name')->nullable(); 28 | $table->string('ship_phone')->nullable(); 29 | $table->string('ship_email')->nullable(); 30 | $table->string('ship_address_1')->unique(); 31 | $table->string('ship_address_2')->unique(); 32 | $table->string('ship_city')->unique(); 33 | $table->string('ship_country')->unique(); 34 | $table->string('ship_post_code')->unique(); 35 | $table->timestamps(); 36 | }); 37 | } 38 | 39 | /** 40 | * Reverse the migrations. 41 | * 42 | * @return void 43 | */ 44 | public function down() 45 | { 46 | Schema::dropIfExists('members'); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /database/migrations/2021_11_17_172832_create_settings_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('company_name')->nullable(); 19 | $table->string('company_email')->unique()->nullable(); 20 | $table->string('company_phone')->nullable(); 21 | $table->string('company_address_1')->nullable(); 22 | $table->string('company_address_2')->nullable(); 23 | $table->string('company_address_3')->nullable(); 24 | $table->string('company_country')->nullable(); 25 | $table->string('company_postcode')->nullable(); 26 | $table->string('currency')->nullable(); 27 | $table->string('enable_tax')->default('true'); 28 | $table->string('include_tax')->default('false'); 29 | $table->string('tax_rate')->nullable(); 30 | $table->string('invoice_prefix')->default('INV'); 31 | $table->string('invoice_initial_value')->default(1); 32 | $table->string('invoice_theme')->default('#222222'); 33 | $table->string('company_logo')->nullable(); 34 | $table->string('company_logo_width')->default(300); 35 | $table->string('company_logo_height')->default(90); 36 | $table->timestamps(); 37 | }); 38 | } 39 | 40 | /** 41 | * Reverse the migrations. 42 | * 43 | * @return void 44 | */ 45 | public function down() 46 | { 47 | Schema::dropIfExists('settings'); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /database/seeders/CustomerSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /database/seeders/InvoiceDetailSeeder.php: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | ./tests/Unit 10 | 11 | 12 | ./tests/Feature 13 | 14 | 15 | 16 | 17 | ./app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/assets/css/skin-purple.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Skin: Purple 3 | * ------------ 4 | */ 5 | .skin-purple .main-header .navbar { 6 | background-color: #605ca8; 7 | 8 | } 9 | .skin-purple .main-header .navbar .nav > li > a { 10 | color: #ffffff; 11 | } 12 | .skin-purple .main-header .navbar .nav > li > a:hover, 13 | .skin-purple .main-header .navbar .nav > li > a:active, 14 | .skin-purple .main-header .navbar .nav > li > a:focus, 15 | .skin-purple .main-header .navbar .nav .open > a, 16 | .skin-purple .main-header .navbar .nav .open > a:hover, 17 | .skin-purple .main-header .navbar .nav .open > a:focus, 18 | .skin-purple .main-header .navbar .nav > .active > a { 19 | background: rgba(0, 0, 0, 0.1); 20 | color: #f6f6f6; 21 | } 22 | .skin-purple .main-header .navbar .sidebar-toggle { 23 | color: #ffffff; 24 | } 25 | .skin-purple .main-header .navbar .sidebar-toggle:hover { 26 | color: #f6f6f6; 27 | background: rgba(0, 0, 0, 0.1); 28 | } 29 | .skin-purple .main-header .navbar .sidebar-toggle { 30 | color: #fff; 31 | } 32 | .skin-purple .main-header .navbar .sidebar-toggle:hover { 33 | background-color: #555299; 34 | } 35 | @media (max-width: 767px) { 36 | .skin-purple .main-header .navbar .dropdown-menu li.divider { 37 | background-color: rgba(255, 255, 255, 0.1); 38 | } 39 | .skin-purple .main-header .navbar .dropdown-menu li a { 40 | color: #fff; 41 | } 42 | .skin-purple .main-header .navbar .dropdown-menu li a:hover { 43 | background: #555299; 44 | } 45 | } 46 | .skin-purple .main-header .logo { 47 | background-color: #555299; 48 | color: #ffffff; 49 | border-bottom: 0 solid transparent; 50 | } 51 | .skin-purple .main-header .logo:hover { 52 | background-color: #545096; 53 | text-decoration: none; 54 | } 55 | .skin-purple .main-header li.user-header { 56 | background-color: #605ca8; 57 | } 58 | .skin-purple .content-header { 59 | background: transparent; 60 | } 61 | .skin-purple .wrapper, 62 | .skin-purple .main-sidebar, 63 | .skin-purple .left-side { 64 | background-color: #4c4990; 65 | } 66 | .skin-purple .user-panel > .info, 67 | .skin-purple .user-panel > .info > a { 68 | color: #fff; 69 | } 70 | .skin-purple .sidebar-menu > li.header { 71 | color: #8cb1c1; 72 | background: #343263; 73 | } 74 | .skin-purple .sidebar-menu > li > a { 75 | border-left: 3px solid transparent; 76 | 77 | } 78 | .skin-purple .sidebar-menu > li:hover > a, 79 | .skin-purple .sidebar-menu > li.active > a { 80 | color: #ffffff; 81 | background: #33315a; 82 | border-left-color: #605ca8; 83 | } 84 | .skin-purple .sidebar-menu > li > .treeview-menu { 85 | margin: 0 1px; 86 | background: #3b3961; 87 | } 88 | .skin-purple .sidebar a { 89 | color: #ddd; 90 | text-decoration: none; 91 | } 92 | .skin-purple .sidebar a:hover { 93 | text-decoration: none; 94 | } 95 | .skin-purple .treeview-menu > li > a { 96 | color: #c6cbd8; 97 | text-decoration: none; 98 | } 99 | .skin-purple .treeview-menu > li.active > a, 100 | .skin-purple .treeview-menu > li > a:hover { 101 | color: #ffffff; 102 | } 103 | .skin-purple .sidebar-form { 104 | border-radius: 3px; 105 | border: 1px solid #374850; 106 | margin: 10px 10px; 107 | } 108 | .skin-purple .sidebar-form input[type="text"], 109 | .skin-purple .sidebar-form .btn { 110 | box-shadow: none; 111 | background-color: #374850; 112 | border: 1px solid transparent; 113 | height: 35px; 114 | } 115 | .skin-purple .sidebar-form input[type="text"] { 116 | color: #666; 117 | border-top-left-radius: 2px; 118 | border-top-right-radius: 0; 119 | border-bottom-right-radius: 0; 120 | border-bottom-left-radius: 2px; 121 | } 122 | .skin-purple .sidebar-form input[type="text"]:focus, 123 | .skin-purple .sidebar-form input[type="text"]:focus + .input-group-btn .btn { 124 | background-color: #fff; 125 | color: #666; 126 | } 127 | .skin-purple .sidebar-form input[type="text"]:focus + .input-group-btn .btn { 128 | border-left-color: #fff; 129 | } 130 | .skin-purple .sidebar-form .btn { 131 | color: #999; 132 | border-top-left-radius: 0; 133 | border-top-right-radius: 2px; 134 | border-bottom-right-radius: 2px; 135 | border-bottom-left-radius: 0; 136 | } 137 | -------------------------------------------------------------------------------- /public/assets/css/styles.css: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * LARAVEL PHP FRAMEWORK JSS Invoice Management System * 3 | * * * 4 | * Version: 1.0 * 5 | * Author: Alagie Singhateh * 6 | * Email: 3939919@gmail.com * 7 | * Website: https:://www.jambasangsang.com * 8 | *******************************************************************************/ 9 | 10 | 11 | body { 12 | padding: 0; 13 | background-color: #605ca8; 14 | } 15 | 16 | .btn-primary { 17 | background-color: #9966cc; 18 | border-color: #9966cc; 19 | } 20 | 21 | .btn-primary:hover { 22 | background-color: #993399; 23 | border-color: #993399; 24 | } 25 | 26 | .btn-danger { 27 | background-color: #f44336; 28 | border-color: #f44336; 29 | } 30 | 31 | .btn-danger:hover { 32 | background-color: #f72a1b; 33 | border-color: #f72a1b; 34 | } 35 | 36 | .btn-success { 37 | background-color: #009966; 38 | border-color: #009966; 39 | } 40 | 41 | .panel-login { 42 | background-color: #ffffff !important; 43 | /*box-shadow: 5px 0px 77px #333;*/ 44 | } 45 | 46 | .clear { 47 | clear: both; 48 | } 49 | 50 | .login-panel { 51 | box-shadow: 5px 0px 77px #333; 52 | margin-top: 150px; 53 | } 54 | 55 | .panel-body { 56 | padding: 30px 30px 15px 30px; 57 | } 58 | 59 | .panel-heading { 60 | padding: 15px 30px 15px 30px; 61 | } 62 | 63 | .float-left { 64 | float: left !important; 65 | } 66 | 67 | .float-right { 68 | float: right !important; 69 | } 70 | 71 | .margin-bottom { 72 | margin-bottom: 1em; 73 | } 74 | 75 | .margin-top { 76 | margin-top: 1em; 77 | } 78 | 79 | .padding-right { 80 | padding-right: 15px; 81 | } 82 | 83 | .no-padding-right { 84 | padding-right: 0; 85 | } 86 | 87 | .no-margin-bottom { 88 | margin-bottom: 0; 89 | } 90 | 91 | .user { 92 | margin-top: 8px; 93 | margin-right: 10px; 94 | } 95 | 96 | /* Forms */ 97 | input.shipping { 98 | text-align: right; 99 | } 100 | .custom_email_textarea { 101 | width: 100%; 102 | padding: 10px; 103 | } 104 | 105 | .invoice_product_qty { 106 | width: 70px; 107 | text-align: center; 108 | } 109 | .invoice_type { 110 | text-transform: uppercase; 111 | } 112 | 113 | .select-customer { 114 | margin-top: 10px; 115 | } 116 | 117 | .delete-row { 118 | float: left; 119 | margin-top: 4px; 120 | } 121 | 122 | .item-select { 123 | float: left; 124 | margin: 4px; 125 | } 126 | 127 | .item-input { 128 | float: left; 129 | width: 65%; 130 | margin-left: 10px; 131 | } 132 | 133 | .textarea { 134 | width: 100%; 135 | } 136 | 137 | .textarea textarea { 138 | width: 100%; 139 | padding: 10px; 140 | resize: none; 141 | } 142 | 143 | /* Other styles */ 144 | strong.shipping { 145 | margin-top: 4px; 146 | display: block; 147 | } 148 | 149 | /* Progress bar */ 150 | .progress .bar { 151 | display: block; 152 | height: 20px; 153 | } 154 | .error-list { 155 | display: none; 156 | } 157 | .progress.progress-danger .bar { 158 | background-color: #c13333; 159 | } 160 | .progress.progress-warning .bar { 161 | background-color: #c1bf33; 162 | } 163 | .progress.progress-success .bar { 164 | background-color: #33c133; 165 | } 166 | 167 | .login-form { 168 | margin-top: 100px; 169 | } 170 | -------------------------------------------------------------------------------- /public/assets/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/singhateh/laravel-invoice-management/2ac1cb7f07ab7cb28c3c05a00789f401a9d493df/public/assets/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/assets/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/singhateh/laravel-invoice-management/2ac1cb7f07ab7cb28c3c05a00789f401a9d493df/public/assets/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/assets/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/singhateh/laravel-invoice-management/2ac1cb7f07ab7cb28c3c05a00789f401a9d493df/public/assets/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/assets/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/singhateh/laravel-invoice-management/2ac1cb7f07ab7cb28c3c05a00789f401a9d493df/public/assets/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /public/assets/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/singhateh/laravel-invoice-management/2ac1cb7f07ab7cb28c3c05a00789f401a9d493df/public/favicon.ico -------------------------------------------------------------------------------- /public/image/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/singhateh/laravel-invoice-management/2ac1cb7f07ab7cb28c3c05a00789f401a9d493df/public/image/empty.png -------------------------------------------------------------------------------- /public/image/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/singhateh/laravel-invoice-management/2ac1cb7f07ab7cb28c3c05a00789f401a9d493df/public/image/logo.png -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class); 50 | 51 | $response = $kernel->handle( 52 | $request = Request::capture() 53 | )->send(); 54 | 55 | $kernel->terminate($request, $response); 56 | -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/app.js": "/js/app.js", 3 | "/css/app.css": "/css/app.css" 4 | } 5 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /resources/css/app.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/singhateh/laravel-invoice-management/2ac1cb7f07ab7cb28c3c05a00789f401a9d493df/resources/css/app.css -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | require('./bootstrap'); 2 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | window._ = require('lodash'); 2 | 3 | /** 4 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 5 | * for JavaScript based Bootstrap features such as modals and tabs. This 6 | * code may be modified to fit the specific needs of your application. 7 | */ 8 | 9 | try { 10 | window.Popper = require('popper.js').default; 11 | window.$ = window.jQuery = require('jquery'); 12 | 13 | require('bootstrap'); 14 | } catch (e) {} 15 | 16 | /** 17 | * We'll load the axios HTTP library which allows us to easily issue requests 18 | * to our Laravel back-end. This library automatically handles sending the 19 | * CSRF token as a header based on the value of the "XSRF" token cookie. 20 | */ 21 | 22 | window.axios = require('axios'); 23 | 24 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 25 | 26 | /** 27 | * Echo exposes an expressive API for subscribing to channels and listening 28 | * for events that are broadcast by Laravel. Echo and event broadcasting 29 | * allows your team to easily build robust real-time web applications. 30 | */ 31 | 32 | // import Echo from 'laravel-echo'; 33 | 34 | // window.Pusher = require('pusher-js'); 35 | 36 | // window.Echo = new Echo({ 37 | // broadcaster: 'pusher', 38 | // key: process.env.MIX_PUSHER_APP_KEY, 39 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 40 | // forceTLS: true 41 | // }); 42 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'password' => 'The provided password is incorrect.', 18 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 17 | 'sent' => 'We have emailed your password reset link!', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that email address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | // Body 2 | $body-bg: #f8fafc; 3 | 4 | // Typography 5 | $font-family-sans-serif: 'Nunito', sans-serif; 6 | $font-size-base: 0.9rem; 7 | $line-height-base: 1.6; 8 | 9 | // Colors 10 | $blue: #3490dc; 11 | $indigo: #6574cd; 12 | $purple: #9561e2; 13 | $pink: #f66d9b; 14 | $red: #e3342f; 15 | $orange: #f6993f; 16 | $yellow: #ffed4a; 17 | $green: #38c172; 18 | $teal: #4dc0b5; 19 | $cyan: #6cb2eb; 20 | -------------------------------------------------------------------------------- /resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | // Fonts 2 | @import url('https://fonts.googleapis.com/css?family=Nunito'); 3 | 4 | // Variables 5 | @import 'variables'; 6 | 7 | // Bootstrap 8 | @import '~bootstrap/scss/bootstrap'; 9 | -------------------------------------------------------------------------------- /resources/views/FlashMessage.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | @if (session()->has('success')) 4 |
5 | {{ session()->get('success') }} 6 |
7 | @endif 8 | -------------------------------------------------------------------------------- /resources/views/admin/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 | 5 |
6 |
7 |
8 |

Create User

9 |
10 |
11 | IMPORT 12 | Back 13 |
14 |
15 |
16 | 17 | @include('FlashMessage') 18 | 19 | 20 |
21 |
22 |
23 | 24 |
25 |
26 | @csrf 27 | 28 | @include('admin.fields') 29 |
30 |
31 |
32 |
33 |
34 | 35 | @endsection 36 | 37 | -------------------------------------------------------------------------------- /resources/views/admin/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 | 5 |
6 |
7 |
8 |

Edit User

9 |
10 |
11 | Back 12 |
13 |
14 |
15 | 16 | @include('FlashMessage') 17 | 18 | 19 |
20 |
21 |
22 |
23 |
24 | @csrf 25 | 26 | 27 | @include('admin.fields') 28 |
29 |
30 | 31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | 39 | @endsection 40 | -------------------------------------------------------------------------------- /resources/views/admin/fields.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
6 | 7 |
8 |
9 | 11 |
12 |
13 | 14 |
15 |
16 | 17 |
18 |
19 | 21 |
22 |
23 | 25 |
26 |
27 | 28 | -------------------------------------------------------------------------------- /resources/views/admin/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |

Users List

7 |
8 |
9 | Add User 10 | PDF 11 | Export 12 |
13 |
14 | 15 | @include('FlashMessage') 16 | 17 |
18 |
19 |
20 | @include('admin.table') 21 |
22 |
23 |
24 | 25 | 26 | 27 |
28 | @csrf 29 | @include('admin.modal') 30 |
31 | 32 | @endsection 33 | -------------------------------------------------------------------------------- /resources/views/admin/modal.blade.php: -------------------------------------------------------------------------------- 1 | 22 | -------------------------------------------------------------------------------- /resources/views/admin/show.blade.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/singhateh/laravel-invoice-management/2ac1cb7f07ab7cb28c3c05a00789f401a9d493df/resources/views/admin/show.blade.php -------------------------------------------------------------------------------- /resources/views/admin/table.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | @include('admin.tableContent') 15 | 16 |
SNUser NameUsernameUser EmailUser PhoneActions
17 | -------------------------------------------------------------------------------- /resources/views/admin/tableContent.blade.php: -------------------------------------------------------------------------------- 1 | @forelse ($users as $key => $user) 2 | 3 | {{ $key + 1 }} 4 | {{ $user->name }} 5 | {{ $user->username }} 6 | {{ $user->email }} 7 | {{ $user->phone }} 8 | 9 | 11 | 12 | 13 | @if (auth()->user()->id != $user->id) 14 | 18 | 19 | 20 | @endif 21 | 22 | 23 | @empty 24 | 25 | @endforelse 26 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/confirm.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Confirm Password') }}
9 | 10 |
11 | {{ __('Please confirm your password before continuing.') }} 12 | 13 |
14 | @csrf 15 | 16 |
17 | 18 | 19 |
20 | 21 | 22 | @error('password') 23 | 24 | {{ $message }} 25 | 26 | @enderror 27 |
28 |
29 | 30 |
31 |
32 | 35 | 36 | @if (Route::has('password.request')) 37 | 38 | {{ __('Forgot Your Password?') }} 39 | 40 | @endif 41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | @endsection 50 | -------------------------------------------------------------------------------- /resources/views/auth/verify.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Verify Your Email Address') }}
9 | 10 |
11 | @if (session('resent')) 12 | 15 | @endif 16 | 17 | {{ __('Before proceeding, please check your email for a verification link.') }} 18 | {{ __('If you did not receive the email') }}, 19 |
20 | @csrf 21 | . 22 |
23 |
24 |
25 |
26 |
27 |
28 | @endsection 29 | -------------------------------------------------------------------------------- /resources/views/customers/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 | 5 |
6 |
7 |
8 |

Create Customer

9 |
10 |
11 | IMPORT 12 | Back 13 |
14 |
15 |
16 | 17 | 21 | 22 |
23 |
24 |
25 |
26 |
27 | @csrf 28 | 29 | @include('customers.fields') 30 |
31 |
32 | 33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | 41 | @endsection 42 | -------------------------------------------------------------------------------- /resources/views/customers/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 | 5 |
6 |
7 |
8 |

Edit Customer

9 |
10 |
11 | Back 12 |
13 |
14 |
15 | 16 | 20 | 21 |
22 |
23 |
24 |
25 |
26 | @csrf 27 | 28 | 29 | @include('customers.fields') 30 |
31 |
32 | 33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | 41 | @endsection 42 | -------------------------------------------------------------------------------- /resources/views/customers/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |

Customers List

7 |
8 |
9 | Add Customer 10 | PDF 11 | Export 12 |
13 |
14 | @include('FlashMessage') 15 |
16 |
17 |
18 | @include('customers.table') 19 |
20 |
21 | 22 |
23 | @csrf 24 | @include('customers.modal') 25 |
26 | @endsection 27 | -------------------------------------------------------------------------------- /resources/views/customers/modal.blade.php: -------------------------------------------------------------------------------- 1 | 32 | -------------------------------------------------------------------------------- /resources/views/customers/show.blade.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/singhateh/laravel-invoice-management/2ac1cb7f07ab7cb28c3c05a00789f401a9d493df/resources/views/customers/show.blade.php -------------------------------------------------------------------------------- /resources/views/customers/table.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | @if (!Request::is('invoices*')) 9 | 10 | @endif 11 | 12 | 13 | 14 | 15 | 16 | @include('customers.tableContent') 17 | 18 |
SN NameEmailPhoneCountryActions
19 | -------------------------------------------------------------------------------- /resources/views/customers/tableContent.blade.php: -------------------------------------------------------------------------------- 1 | @forelse ($customers as $key => $customer) 2 | 3 | {{ $key + 1 }} 4 | {{ $customer->name }} 5 | {{ $customer->email }} 6 | {{ $customer->phone }} 7 | @if (!Request::is('invoices*')) 8 | {{ $customer->country }} 9 | @endif 10 | 11 | @if (Request::is('invoices*')) 12 | @include('invoices.select_customer') 13 | @else 14 | 16 | 17 | 18 | 22 | 23 | 24 | @endif 25 | 26 | 27 | @empty 28 | 29 | @endforelse 30 | -------------------------------------------------------------------------------- /resources/views/home.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 | 5 |
6 | 7 |
8 | 9 |
10 |
11 |

{{ $totalInvoices }}

12 | 13 |

Total Invoices

14 |
15 |
16 | 17 |
18 | 19 |
20 |
21 | 22 |
23 | 24 |
25 |
26 |

{{ $totalPaidBill }}

27 | 28 |

Paid Invoice Billis

29 |
30 |
31 | 32 |
33 | 34 |
35 |
36 | 37 |
38 | 39 |
40 |
41 |

{{ $totalPendingBill }}

42 | 43 |

Pending Invoice Bills

44 |
45 |
46 | 47 |
48 | 49 |
50 |
51 | 52 |
53 | 54 |
55 |
56 |

{{ $totalDueBill }}

57 | 58 |

Due Amount

59 |
60 |
61 | 62 |
63 | 64 |
65 |
66 | 67 |
68 | 69 | 70 | 71 | 72 |
73 | 74 |
75 |
76 |
77 |

78 | {{ $totalAmount }} 79 |

80 | 81 |

Total Sales Amount

82 |
83 |
84 | 85 |
86 | 87 |
88 |
89 | 90 |
91 | 92 |
93 |
94 |

{{ $totalProducts }}

95 | 96 |

Total Products

97 |
98 |
99 | 100 |
101 | 102 |
103 |
104 | 105 |
106 | 107 |
108 |
109 |

{{ $totalCustomers }}

110 | 111 |

Total Customers

112 |
113 |
114 | 115 |
116 | 117 |
118 |
119 | 120 | 121 | 122 |
123 | 124 |
125 |
126 |

{{ $totalUsers }}

127 | 128 |

Total Users

129 |
130 |
131 | 132 |
133 | 134 |
135 |
136 |
137 | 138 | 139 | 140 | 141 | 142 | @endsection 143 | -------------------------------------------------------------------------------- /resources/views/invoices/fields.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @include('invoices.products') 3 | -------------------------------------------------------------------------------- /resources/views/invoices/filters.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | Select Type 5 | 10 |
11 |
12 |
13 |
14 | Select Status 15 | 21 |
22 |
23 |
24 |
25 |
26 | 28 | 29 | 30 | 31 |
32 |
33 |
34 |
35 |
36 |
37 | 39 | 40 | 41 | 42 |
43 |
44 |
45 |
46 | DOWNLOAD PDF RECEIPT 47 | PREVIEW PDF RECEIPT 48 | DONT INCLUDE RECEIPT 49 |
50 |
51 | -------------------------------------------------------------------------------- /resources/views/invoices/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |

Invoice List

7 |
8 |
9 | Add New Invoice 10 | PDF 11 | Export 12 |
13 |
14 | @include('FlashMessage') 15 |
16 |
17 |
18 | @include('invoices.table') 19 |
20 |
21 |
22 | 23 | 24 | 25 | @include('invoices.modals') 26 | 27 | 28 | @endsection 29 | -------------------------------------------------------------------------------- /resources/views/invoices/notes.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |
7 |
8 |
9 |
10 | Sub Total: 11 |
12 |
13 | {{ $setting->currency }} 0.00 14 | 15 |
16 |
17 |
18 |
19 | Discount %: 20 |
21 |
22 | {{ $setting->currency }}  0.00 23 | 24 |
25 |
26 |
27 |
28 | Shipping Charges: 29 |
30 |
31 |
32 | {{ $setting->currency }} 33 | 35 |
36 |
37 |
38 | @if ($setting->enable_tax == true) 39 |
40 |
41 | TAX:
Remove TAX vat == 0.00 ? 'checked' : '' }} @endif class="remove_vat"> 42 |
43 |
44 | {{ $setting->currency }} 0.00 45 | 46 |
47 |
48 | @endif 49 |
50 |
51 | Total: 52 |
53 |
54 | {{ $setting->currency }}  0.00 55 | 56 |
57 |
58 |
59 | 60 |
61 | 63 |
64 | 65 |
66 | -------------------------------------------------------------------------------- /resources/views/invoices/select_customer.blade.php: -------------------------------------------------------------------------------- 1 | 2 | Select 18 | -------------------------------------------------------------------------------- /resources/views/invoices/show.blade.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/singhateh/laravel-invoice-management/2ac1cb7f07ab7cb28c3c05a00789f401a9d493df/resources/views/invoices/show.blade.php -------------------------------------------------------------------------------- /resources/views/invoices/table.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | @include('invoices.tableContent') 17 | 18 |
SNInvoice NumberCustomerIssue DateDue DateTypeStatusActions
19 | -------------------------------------------------------------------------------- /resources/views/invoices/tableContent.blade.php: -------------------------------------------------------------------------------- 1 | @foreach ($invoices as $key => $invoice) 2 | 3 | 4 | {{ $key + 1 }} 5 | {{ $invoice->id }} 6 | {{ $invoice->customer->name }} 7 | {{ $invoice->invoice_date }} 8 | {{ $invoice->invoice_due_date }} 9 | {{ $invoice->invoice_type }} 10 | {{ $invoice->status == 1 ? 'Paid' : 'Open' }} 12 | 13 | 14 | 16 | 17 | 18 | 20 | 21 | 22 | 26 | 27 | 28 | 29 | 30 | @endforeach 31 | -------------------------------------------------------------------------------- /resources/views/layouts/footer.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | {{-- --}} 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /resources/views/layouts/header.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Invoice Management System 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {{ config('app.name', 'Laravel') }} 19 | 20 | 21 | {{-- --}} 22 | 23 | 24 | 25 | 26 | 27 | 28 | {{-- --}} 29 | 30 | 31 | 32 | 33 | 34 | 35 | {{-- --}} 36 | {{-- --}} 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | {{-- 48 | --}} 49 | 50 | 51 | 52 | 53 | {{-- --}} 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | {{-- --}} 62 | {{-- --}} 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 |
75 | -------------------------------------------------------------------------------- /resources/views/layouts/sidebar.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 73 | 74 | -------------------------------------------------------------------------------- /resources/views/pdf/customers.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 | 6 |
7 | 9 |
10 |

{{ Str::ucfirst('customers List') }}

11 |

Date: {{ date('d m Y'), strtotime(now()) }} 12 |

13 |
14 |
15 | 16 | 17 | 18 |
19 |
20 |
21 |
22 |

{{ $setting->company_name }}

23 |

24 | Address: {{ $setting->company_address_1 }}
25 | City: {{ $setting->company_city }}    26 | {{ $setting->company_country }} - {{ $setting->company_postcode }}
27 | Tel: {{ $setting->company_phone }}
28 | Email: {{ $setting->company_email }} 29 |

30 |
31 |
32 |
33 |
34 | 35 |
36 | 37 |
38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | @foreach ($customers as $key => $customer) 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | @endforeach 57 |
#NAMEEMAILPHONECOUNTRY
{{ $key+1 }}{{ $customer->name }}{{ $customer->email }}{{ $customer->phone }}{{ $customer->country }}
58 |
59 |
60 |
61 | 62 |
63 | 70 |
71 |
72 | 73 | -------------------------------------------------------------------------------- /resources/views/pdf/products.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 | 6 |
7 | 9 |
10 |

{{ Str::ucfirst('products List') }}

11 |

Date: {{ date('d m Y'), strtotime(now()) }} 12 |

13 |
14 |
15 | 16 |
17 |
18 |
19 |
20 |

{{ $setting->company_name }}

21 |

22 | Address: {{ $setting->company_address_1 }}
23 | City: {{ $setting->company_city }}    24 | {{ $setting->company_country }} - {{ $setting->company_postcode }}
25 | Tel: {{ $setting->company_phone }}
26 | Email: {{ $setting->company_email }} 27 |

28 |
29 |
30 |
31 |
32 | 33 |
34 | 35 |
36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | @foreach ($products as $key => $product) 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | @endforeach 55 |
#NAMEPRICEQTYDESCRIBTION
{{ $key+1 }}{{ $product->product_name }}{{ $product->product_price }}{{ $product->product_qty }}{{ $product->product_desc }}
56 |
57 |
58 |
59 | 60 |
61 | 68 |
69 |
70 | 71 | -------------------------------------------------------------------------------- /resources/views/pdf/users.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 | 6 |
7 | 9 |
10 |

{{ Str::ucfirst('users List') }}

11 |

Date: {{ date('d m Y'), strtotime(now()) }} 12 |

13 |
14 |
15 | 16 | 17 | 18 |
19 |
20 |
21 |
22 |

{{ $setting->company_name }}

23 |

24 | Address: {{ $setting->company_address_1 }}
25 | City: {{ $setting->company_city }}    26 | {{ $setting->company_country }} - {{ $setting->company_postcode }}
27 | Tel: {{ $setting->company_phone }}
28 | Email: {{ $setting->company_email }} 29 |

30 |
31 |
32 |
33 |
34 | 35 |
36 | 37 |
38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | @foreach ($users as $key => $user) 48 | 49 | 50 | 51 | 52 | 53 | 54 | @endforeach 55 |
#NAMEEMAILPHONE
{{ $key+1 }}{{ $user->name }}{{ $user->email }}{{ $user->phone }}
56 |
57 |
58 |
59 | 60 |
61 | 68 |
69 |
70 | 71 | -------------------------------------------------------------------------------- /resources/views/products/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 | 5 |
6 |
7 |
8 |

Create Product

9 |
10 |
11 | IMPORT 12 | Back 13 |
14 |
15 |
16 | 17 | 21 | 22 |
23 |
24 |
25 | {{--
26 |

Product Information

27 |
--}} 28 |
29 |
30 | @csrf 31 | 32 | @include('products.fields') 33 |
34 |
35 |
36 |
37 |
38 | 39 | @endsection 40 | -------------------------------------------------------------------------------- /resources/views/products/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 | 5 |
6 |
7 |
8 |

Edit Product

9 |
10 |
11 | Back 12 |
13 |
14 |
15 | 16 | 20 | 21 |
22 |
23 |
24 |
25 |
26 | @csrf 27 | 28 | 29 | @include('products.fields') 30 | 31 |
32 |
33 | 34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | 42 | @endsection 43 | -------------------------------------------------------------------------------- /resources/views/products/fields.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
6 | 7 |
8 |
9 |
10 | {{ $setting->currency }} 11 | 12 |
13 |
14 |

15 |
16 | 17 |
18 |
19 | 20 | -------------------------------------------------------------------------------- /resources/views/products/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |

Products List

7 |
8 |
9 | Add Product 10 | PDF 11 | Export 12 |
13 |
14 | 15 | @include('FlashMessage') 16 | 17 |
18 |
19 |
20 | @include('products.table') 21 |
22 |
23 |
24 | 25 |
26 | @csrf 27 | @include('products.modal') 28 |
29 | 30 | 31 | @endsection 32 | -------------------------------------------------------------------------------- /resources/views/products/modal.blade.php: -------------------------------------------------------------------------------- 1 | 22 | -------------------------------------------------------------------------------- /resources/views/products/show.blade.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/singhateh/laravel-invoice-management/2ac1cb7f07ab7cb28c3c05a00789f401a9d493df/resources/views/products/show.blade.php -------------------------------------------------------------------------------- /resources/views/products/table.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | @include('products.tableContent') 14 | 15 |
SNProduct NameProduct QtyProduct PriceProduct DescActions
16 | -------------------------------------------------------------------------------- /resources/views/products/tableContent.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | @forelse ($products as $key => $product) 4 | 5 | {{ $key + 1 }} 6 | {{ $product->product_name .''. $product->id }} 7 | {{ $product->product_qty }} 8 | {{ $product->product_price }} 9 | {{ $product->product_desc }} 10 | 11 | 13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | @empty 24 | 25 | @endforelse 26 | -------------------------------------------------------------------------------- /resources/views/settings/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |

System Settings

7 |
8 |
9 | @include('FlashMessage') 10 |
11 |
12 |
13 | @csrf 14 | @include('settings.fields') 15 | 16 | 19 |
20 |
21 | @endsection 22 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 18 | return $request->user(); 19 | }); 20 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->purpose('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | group(function () { 29 | route::get('export/users', [UserController::class, 'export'])->name('export.users'); 30 | route::get('export/products', [ProductController::class, 'export'])->name('export.products'); 31 | route::get('export/customers', [CustomerController::class, 'export'])->name('export.customers'); 32 | 33 | Route::resource('user', UserController::class); 34 | Route::resource('customers', CustomerController::class); 35 | Route::resource('products', ProductController::class); 36 | Route::resource('invoices', InvoiceController::class); 37 | 38 | route::get('settings', [SettingController::class, 'index'])->name('setting.index'); 39 | route::post('store', [SettingController::class, 'store'])->name('setting.store'); 40 | 41 | 42 | Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home'); 43 | }); 44 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/js/app.js', 'public/js') 15 | .sass('resources/sass/app.scss', 'public/css') 16 | .sourceMaps(); 17 | --------------------------------------------------------------------------------