├── .env.example
├── .env.travis
├── .gitattributes
├── .gitignore
├── .travis.yml
├── app
├── Console
│ ├── Commands
│ │ └── Inspire.php
│ └── Kernel.php
├── Events
│ └── Event.php
├── Exceptions
│ └── Handler.php
├── Http
│ ├── Controllers
│ │ ├── Auth
│ │ │ ├── AuthController.php
│ │ │ └── PasswordController.php
│ │ ├── Controller.php
│ │ ├── CustomersController.php
│ │ ├── OrdersController.php
│ │ ├── ProductsController.php
│ │ ├── RefundsController.php
│ │ ├── StocksController.php
│ │ ├── StoresController.php
│ │ ├── SuppliersController.php
│ │ └── UsersController.php
│ ├── Kernel.php
│ ├── Middleware
│ │ ├── Authenticate.php
│ │ ├── EncryptCookies.php
│ │ ├── RedirectIfAuthenticated.php
│ │ └── VerifyCsrfToken.php
│ ├── Requests
│ │ └── Request.php
│ └── routes.php
├── Jobs
│ └── Job.php
├── Listeners
│ └── .gitkeep
├── Models
│ ├── Customer.php
│ ├── Order.php
│ ├── Product.php
│ ├── Refund.php
│ ├── Stock.php
│ ├── Store.php
│ ├── Supplier.php
│ └── User.php
├── Policies
│ └── .gitkeep
└── Providers
│ ├── AppServiceProvider.php
│ ├── AuthServiceProvider.php
│ ├── EventServiceProvider.php
│ └── RouteServiceProvider.php
├── artisan
├── bootstrap
├── app.php
├── autoload.php
└── cache
│ └── .gitignore
├── composer.json
├── composer.lock
├── config
├── app.php
├── auth.php
├── broadcasting.php
├── cache.php
├── compile.php
├── database.php
├── filesystems.php
├── mail.php
├── queue.php
├── services.php
├── session.php
└── view.php
├── database
├── .gitignore
├── factories
│ └── ModelFactory.php
├── migrations
│ ├── .gitkeep
│ ├── 2014_10_12_000000_create_users_table.php
│ ├── 2014_10_12_100000_create_password_resets_table.php
│ ├── 2016_06_20_221515_create_products_table.php
│ ├── 2016_06_29_172010_create_customers_table.php
│ ├── 2016_06_30_100442_create_suppliers_table.php
│ ├── 2016_07_01_163541_create_stores_table.php
│ ├── 2016_07_01_202523_create_stocks_table.php
│ ├── 2016_07_21_105746_create_orders_table.php
│ ├── 2016_07_21_110001_create_orders_meta_table.php
│ ├── 2016_07_22_104834_create_refunds_table.php
│ └── 2016_07_22_105250_create_refunds_meta_table.php
└── seeds
│ ├── .gitkeep
│ └── DatabaseSeeder.php
├── gulpfile.js
├── package.json
├── phpunit.xml
├── public
├── .htaccess
├── css
│ ├── app.css
│ ├── app.css.map
│ ├── green.png
│ ├── green@2x.png
│ └── images
│ │ ├── back_disabled.png
│ │ ├── back_enabled.png
│ │ ├── back_enabled_hover.png
│ │ ├── favicon.ico
│ │ ├── forward_disabled.png
│ │ ├── forward_enabled.png
│ │ ├── forward_enabled_hover.png
│ │ ├── sort_asc.png
│ │ ├── sort_asc_disabled.png
│ │ ├── sort_both.png
│ │ ├── sort_desc.png
│ │ ├── sort_desc_disabled.png
│ │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png
│ │ ├── ui-bg_diagonals-thick_20_666666_40x40.png
│ │ ├── ui-bg_flat_10_000000_40x100.png
│ │ ├── ui-bg_glass_100_f6f6f6_1x400.png
│ │ ├── ui-bg_glass_100_fdf5ce_1x400.png
│ │ ├── ui-bg_glass_65_ffffff_1x400.png
│ │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png
│ │ ├── ui-bg_highlight-soft_100_eeeeee_1x100.png
│ │ ├── ui-bg_highlight-soft_75_ffe45c_1x100.png
│ │ ├── ui-icons_222222_256x240.png
│ │ ├── ui-icons_228ef1_256x240.png
│ │ ├── ui-icons_ef8c08_256x240.png
│ │ ├── ui-icons_ffd27a_256x240.png
│ │ └── ui-icons_ffffff_256x240.png
├── favicon.ico
├── fonts
│ ├── Lato-Hairline.woff
│ ├── Lato-Regular.woff
│ ├── fontawesome-webfont.woff
│ ├── glyphicons-halflings-regular.eot
│ ├── glyphicons-halflings-regular.svg
│ ├── glyphicons-halflings-regular.ttf
│ ├── glyphicons-halflings-regular.woff
│ └── glyphicons-halflings-regular.woff2
├── images
│ ├── 404
│ │ ├── 404.png
│ │ ├── bg.png
│ │ └── bg1.png
│ ├── db_vectormode.png
│ ├── sort_asc.png
│ ├── sort_asc_disabled.png
│ ├── sort_both.png
│ ├── sort_desc.png
│ ├── sort_desc_disabled.png
│ └── vectormode.png
├── index.php
├── js
│ ├── bottom.js
│ ├── bottom.js.map
│ ├── top.js
│ └── top.js.map
└── robots.txt
├── readme.md
├── resources
├── assets
│ ├── js
│ │ ├── app.js
│ │ └── validator.js
│ └── sass
│ │ └── app.scss
├── lang
│ └── en
│ │ ├── auth.php
│ │ ├── pagination.php
│ │ ├── passwords.php
│ │ └── validation.php
└── views
│ ├── auth
│ └── login.blade.php
│ ├── customers
│ ├── create.blade.php
│ ├── edit.blade.php
│ └── index.blade.php
│ ├── errors
│ └── 503.blade.php
│ ├── layouts
│ └── master.blade.php
│ ├── orders
│ ├── create.blade.php
│ ├── edit.blade.php
│ └── index.blade.php
│ ├── partials
│ ├── _customer_form.blade.php
│ ├── _order_form.php
│ ├── _product_form.blade.php
│ ├── _refund_form.php
│ ├── _sidebar.blade.php
│ ├── _stock_form.blade.php
│ ├── _store_form.blade.php
│ ├── _supplier_form.blade.php
│ ├── _topnav.blade.php
│ └── _user_form.blade.php
│ ├── products
│ ├── create.blade.php
│ ├── edit.blade.php
│ └── index.blade.php
│ ├── refunds
│ ├── create.blade.php
│ ├── edit.blade.php
│ └── index.blade.php
│ ├── stocks
│ ├── create.blade.php
│ ├── edit.blade.php
│ └── index.blade.php
│ ├── stores
│ ├── create.blade.php
│ ├── edit.blade.php
│ └── index.blade.php
│ ├── suppliers
│ ├── create.blade.php
│ ├── edit.blade.php
│ └── index.blade.php
│ ├── users
│ ├── create.blade.php
│ ├── edit.blade.php
│ └── index.blade.php
│ ├── vendor
│ └── .gitkeep
│ └── welcome.blade.php
├── server.php
├── storage
├── app
│ ├── .gitignore
│ └── public
│ │ └── .gitignore
├── database.sqlite
├── framework
│ ├── .gitignore
│ ├── cache
│ │ └── .gitignore
│ ├── sessions
│ │ └── .gitignore
│ └── views
│ │ └── .gitignore
└── logs
│ └── .gitignore
└── tests
├── ExampleTest.php
└── TestCase.php
/.env.example:
--------------------------------------------------------------------------------
1 | APP_ENV=local
2 | APP_DEBUG=true
3 | APP_KEY=SomeRandomString
4 | APP_URL=http://localhost
5 |
6 | DB_CONNECTION=mysql
7 | DB_HOST=127.0.0.1
8 | DB_PORT=3306
9 | DB_DATABASE=homestead
10 | DB_USERNAME=homestead
11 | DB_PASSWORD=secret
12 |
13 | CACHE_DRIVER=file
14 | SESSION_DRIVER=file
15 | QUEUE_DRIVER=sync
16 |
17 | REDIS_HOST=127.0.0.1
18 | REDIS_PASSWORD=null
19 | REDIS_PORT=6379
20 |
21 | MAIL_DRIVER=smtp
22 | MAIL_HOST=mailtrap.io
23 | MAIL_PORT=2525
24 | MAIL_USERNAME=null
25 | MAIL_PASSWORD=null
26 | MAIL_ENCRYPTION=null
27 |
--------------------------------------------------------------------------------
/.env.travis:
--------------------------------------------------------------------------------
1 | APP_ENV=testing
2 | APP_KEY=SomeRandomString
3 |
4 | DB_CONNECTION=testing
5 | DB_TEST_USERNAME=root
6 | DB_TEST_PASSWORD=
7 |
8 | CACHE_DRIVER=array
9 | SESSION_DRIVER=array
10 | QUEUE_DRIVER=sync
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | *.css linguist-vendored
3 | *.scss linguist-vendored
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /vendor
2 | /node_modules
3 | /public/storage
4 | Homestead.yaml
5 | Homestead.json
6 | .env
7 | .idea/
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: php
3 | php:
4 | - 7.0
5 | - 5.6
6 | - nightly
7 |
8 | before_script:
9 | - cp .env.travis .env
10 | - mysql -e 'create database homestead_test;'
11 | - composer self-update
12 | - composer install --no-interaction
13 |
14 | script:
15 | - vendor/bin/phpunit
16 |
--------------------------------------------------------------------------------
/app/Console/Commands/Inspire.php:
--------------------------------------------------------------------------------
1 | comment(PHP_EOL.Inspiring::quote().PHP_EOL);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | command('inspire')
28 | // ->hourly();
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/Events/Event.php:
--------------------------------------------------------------------------------
1 | middleware($this->guestMiddleware(), ['except' => ['logout', 'getLogout'] ]);
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|max:255',
54 | 'email' => 'required|email|max:255|unique:users',
55 | 'password' => 'required|min:6|confirmed',
56 | ]);
57 | }
58 |
59 | /**
60 | * Create a new user instance after a valid registration.
61 | *
62 | * @param array $data
63 | * @return User
64 | */
65 | protected function create(array $data)
66 | {
67 | return User::create([
68 | 'name' => $data['name'],
69 | 'email' => $data['email'],
70 | 'password' => bcrypt($data['password']),
71 | ]);
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/PasswordController.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Controller.php:
--------------------------------------------------------------------------------
1 | create($request->all());
43 | \Alert::success('Your requested customer has been created.', 'Customer Created !');
44 | return redirect('/customers');
45 | }
46 |
47 | /**
48 | * Display the specified resource.
49 | *
50 | * @param int $id
51 | * @return \Illuminate\Http\Response
52 | */
53 | public function show($id)
54 | {
55 | //
56 | }
57 |
58 | /**
59 | * Show the form for editing the specified resource.
60 | *
61 | * @param int $id
62 | * @return \Illuminate\Http\Response
63 | */
64 | public function edit($id)
65 | {
66 | $customer = Customer::findOrFail($id);
67 | return view('customers.edit', compact('customer'));
68 | }
69 |
70 | /**
71 | * Update the specified resource in storage.
72 | *
73 | * @param \Illuminate\Http\Request $request
74 | * @param int $id
75 | * @return \Illuminate\Http\Response
76 | */
77 | public function update(Request $request, $id)
78 | {
79 | $customer = Customer::findOrFail($id);
80 | $customer->fill(\Input::all());
81 | $customer->save();
82 | \Alert::success('Your requested customer info has been updated.', 'Customer Info Updated !');
83 | return \Redirect::to('/customers');
84 | }
85 |
86 | /**
87 | * Remove the specified resource from storage.
88 | *
89 | * @param int $id
90 | * @return \Illuminate\Http\Response
91 | */
92 | public function destroy($id)
93 | {
94 | $customer = Customer::findOrFail($id);
95 | $customer->delete();
96 | \Alert::info('Your requested customer has been deleted.', 'Customer Deleted !');
97 | return \Redirect::to('/customers');
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/app/Http/Controllers/OrdersController.php:
--------------------------------------------------------------------------------
1 | all();
43 | $order = new Order;
44 | $order->customer_id = $input['customer_id'];
45 | $order->customer_name = $input['customer_name'];
46 | $order->customer_phone = $input['customer_phone'];
47 | $order->customer_address = $input['customer_address'];
48 | $order->total = $input['total'];
49 | $order->grandtotal_vat = $input['grandtotal_vat'];
50 | $order->delivery = $input['delivery'];
51 | $order->grandtotal = $input['grandtotal'];
52 | $order->save();
53 | foreach ($input['rows'] as $key => $value){
54 | $order->products()->attach(
55 | $input['product'][$key],
56 | [
57 | 'price' => $input['price'][$key],
58 | 'qty' => $input['qty'][$key],
59 | 'vat' => $input['vat'][$key],
60 | 'row_total_price' => $input['row_total_price'][$key]
61 | ]
62 | );
63 | }
64 | }
65 |
66 | /**
67 | * Display the specified resource.
68 | *
69 | * @param int $id
70 | * @return \Illuminate\Http\Response
71 | */
72 | public function show($id)
73 | {
74 | //
75 | }
76 |
77 | /**
78 | * Show the form for editing the specified resource.
79 | *
80 | * @param int $id
81 | * @return \Illuminate\Http\Response
82 | */
83 | public function edit($id)
84 | {
85 | //
86 | }
87 |
88 | /**
89 | * Update the specified resource in storage.
90 | *
91 | * @param \Illuminate\Http\Request $request
92 | * @param int $id
93 | * @return \Illuminate\Http\Response
94 | */
95 | public function update(Request $request, $id)
96 | {
97 | //
98 | }
99 |
100 | /**
101 | * Remove the specified resource from storage.
102 | *
103 | * @param int $id
104 | * @return \Illuminate\Http\Response
105 | */
106 | public function destroy($id)
107 | {
108 | //
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/app/Http/Controllers/ProductsController.php:
--------------------------------------------------------------------------------
1 | ajax()){
22 | return $products;
23 | }
24 | return view('products.index', compact('products', 'products'));
25 | }
26 |
27 | /**
28 | * Show the form for creating a new resource.
29 | *
30 | * @return \Illuminate\Http\Response
31 | */
32 | public function create()
33 | {
34 | return view('products.create');
35 | }
36 |
37 | /**
38 | * Store a newly created resource in storage.
39 | *
40 | * @param \Illuminate\Http\Request $request
41 | * @return \Illuminate\Http\Response
42 | */
43 | public function store(Product $product, Request $request)
44 | {
45 | $product->create($request->all());
46 | \Alert::success('Your requested product has been created.', 'Product Created !');
47 | return redirect('/products');
48 | }
49 |
50 | /**
51 | * Display the specified resource.
52 | *
53 | * @param int $id
54 | * @return \Illuminate\Http\Response
55 | */
56 | public function show($id)
57 | {
58 | //
59 | }
60 |
61 | /**
62 | * Show the form for editing the specified resource.
63 | *
64 | * @param int $id
65 | * @return \Illuminate\Http\Response
66 | */
67 | public function edit($id)
68 | {
69 | $product = Product::findOrFail($id);
70 | return view('products.edit', compact('product'));
71 | }
72 |
73 | /**
74 | * Update the specified resource in storage.
75 | *
76 | * @param \Illuminate\Http\Request $request
77 | * @param int $id
78 | * @return \Illuminate\Http\Response
79 | */
80 | public function update(Request $request, $id)
81 | {
82 | $product = Product::findOrFail($id);
83 | $product->fill(\Input::all());
84 | $product->save();
85 | \Alert::success('Your requested product info has been updated.', 'Product Info Updated !');
86 | return \Redirect::to('/products');
87 | }
88 |
89 | /**
90 | * Remove the specified resource from storage.
91 | *
92 | * @param int $id
93 | * @return \Illuminate\Http\Response
94 | */
95 | public function destroy($id)
96 | {
97 | $product = Product::findOrFail($id);
98 | $product->delete();
99 | \Alert::info('Your requested product has been deleted.', 'Product Deleted !');
100 | return \Redirect::to('/products');
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/app/Http/Controllers/RefundsController.php:
--------------------------------------------------------------------------------
1 | all();
42 | $refund = new Refund;
43 | $refund->order_id = $input['order_id'];
44 | $refund->customer_id = $input['customer_id'];
45 | $refund->customer_name = $input['customer_name'];
46 | $refund->customer_phone = $input['customer_phone'];
47 | $refund->customer_address = $input['customer_address'];
48 | $refund->total = $input['total'];
49 | $refund->grandtotal_vat = $input['grandtotal_vat'];
50 | $refund->delivery = $input['delivery'];
51 | $refund->grandtotal = $input['grandtotal'];
52 | $refund->save();
53 | foreach ($input['rows'] as $key => $value){
54 | $refund->products()->attach(
55 | $input['product'][$key],
56 | [
57 | 'price' => $input['price'][$key],
58 | 'qty' => $input['qty'][$key],
59 | 'vat' => $input['vat'][$key],
60 | 'row_total_price' => $input['row_total_price'][$key]
61 | ]
62 | );
63 | }
64 | }
65 |
66 | /**
67 | * Display the specified resource.
68 | *
69 | * @param int $id
70 | * @return \Illuminate\Http\Response
71 | */
72 | public function show($id)
73 | {
74 | //
75 | }
76 |
77 | /**
78 | * Show the form for editing the specified resource.
79 | *
80 | * @param int $id
81 | * @return \Illuminate\Http\Response
82 | */
83 | public function edit($id)
84 | {
85 | //
86 | }
87 |
88 | /**
89 | * Update the specified resource in storage.
90 | *
91 | * @param \Illuminate\Http\Request $request
92 | * @param int $id
93 | * @return \Illuminate\Http\Response
94 | */
95 | public function update(Request $request, $id)
96 | {
97 | //
98 | }
99 |
100 | /**
101 | * Remove the specified resource from storage.
102 | *
103 | * @param int $id
104 | * @return \Illuminate\Http\Response
105 | */
106 | public function destroy($id)
107 | {
108 | //
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/app/Http/Controllers/StocksController.php:
--------------------------------------------------------------------------------
1 | get();
25 | if($request->ajax()){
26 | return $stocks;
27 | }
28 | return view('stocks.index', compact('stocks', 'stocks'));
29 | }
30 |
31 | /**
32 | * Show the form for creating a new resource.
33 | *
34 | * @return \Illuminate\Http\Response
35 | */
36 | public function create()
37 | {
38 |
39 | /*
40 | * Getting all product names and ids in one array
41 | */
42 |
43 | $products = Product::all();
44 |
45 | $product_names = [];
46 |
47 | foreach ($products as $product) {
48 | $product_names[$product->id] = $product->name;
49 | }
50 |
51 |
52 | /*
53 | * Getting all supplier names and ids in one array
54 | */
55 | $suppliers = Supplier::all();
56 |
57 | $supplier_names = [];
58 |
59 | foreach ($suppliers as $supplier) {
60 | $supplier_names[$supplier->id] = $supplier->name;
61 | }
62 |
63 | /*
64 | * Getting all store names and ids in one array
65 | */
66 | $stores = Store::all();
67 |
68 | $store_names = [];
69 |
70 | foreach ($stores as $store) {
71 | $store_names[$store->id] = $store->name;
72 | }
73 |
74 | return view('stocks.create', compact('product_names', 'supplier_names', 'store_names'));
75 |
76 | }
77 |
78 | /**
79 | * Stock a newly created resource in storage.
80 | *
81 | * @param \Illuminate\Http\Request $request
82 | * @return \Illuminate\Http\Response
83 | */
84 | public function store(Stock $stock, Request $request)
85 | {
86 | $stock->create($request->all());
87 | \Alert::success('Your requested stock has been created.', 'Stock Created !');
88 | return redirect('/stocks');
89 | }
90 |
91 | /**
92 | * Display the specified resource.
93 | *
94 | * @param int $id
95 | * @return \Illuminate\Http\Response
96 | */
97 | public function show($id)
98 | {
99 | //
100 | }
101 |
102 | /**
103 | * Show the form for editing the specified resource.
104 | *
105 | * @param int $id
106 | * @return \Illuminate\Http\Response
107 | */
108 | public function edit($id)
109 | {
110 | $stock = Stock::findOrFail($id);
111 |
112 | /*
113 | * Getting all product names and ids in one array
114 | */
115 |
116 | $products = Product::all();
117 |
118 | $product_names = [];
119 |
120 | foreach ($products as $product) {
121 | $product_names[$product->id] = $product->name;
122 | }
123 |
124 |
125 | /*
126 | * Getting all supplier names and ids in one array
127 | */
128 | $suppliers = Supplier::all();
129 |
130 | $supplier_names = [];
131 |
132 | foreach ($suppliers as $supplier) {
133 | $supplier_names[$supplier->id] = $supplier->name;
134 | }
135 |
136 | /*
137 | * Getting all store names and ids in one array
138 | */
139 | $stores = Store::all();
140 |
141 | $store_names = [];
142 |
143 | foreach ($stores as $store) {
144 | $store_names[$store->id] = $store->name;
145 | }
146 |
147 | return view('stocks.edit', compact('stock', 'product_names', 'supplier_names', 'store_names'));
148 | }
149 |
150 | /**
151 | * Update the specified resource in storage.
152 | *
153 | * @param \Illuminate\Http\Request $request
154 | * @param int $id
155 | * @return \Illuminate\Http\Response
156 | */
157 | public function update(Request $request, $id)
158 | {
159 | $stock = Stock::findOrFail($id);
160 | $stock->fill(Input::all());
161 | $stock->save();
162 | \Alert::success('Your requested stock info has been updated.', 'Stock Info Updated !');
163 | return \Redirect::to('/stocks');
164 | }
165 |
166 | /**
167 | * Remove the specified resource from storage.
168 | *
169 | * @param int $id
170 | * @return \Illuminate\Http\Response
171 | */
172 | public function destroy($id)
173 | {
174 | $stock = Stock::findOrFail($id);
175 | $stock->delete();
176 | \Alert::info('Your requested stock has been deleted.', 'Stock Deleted !');
177 | return \Redirect::to('/stocks');
178 | }
179 | }
180 |
--------------------------------------------------------------------------------
/app/Http/Controllers/StoresController.php:
--------------------------------------------------------------------------------
1 | create($request->all());
43 | \Alert::success('Your requested store has been created.', 'Store Created !');
44 | return redirect('/stores');
45 | }
46 |
47 | /**
48 | * Display the specified resource.
49 | *
50 | * @param int $id
51 | * @return \Illuminate\Http\Response
52 | */
53 | public function show($id)
54 | {
55 | //
56 | }
57 |
58 | /**
59 | * Show the form for editing the specified resource.
60 | *
61 | * @param int $id
62 | * @return \Illuminate\Http\Response
63 | */
64 | public function edit($id)
65 | {
66 | $store = Store::findOrFail($id);
67 | return view('stores.edit', compact('store'));
68 | }
69 |
70 | /**
71 | * Update the specified resource in storage.
72 | *
73 | * @param \Illuminate\Http\Request $request
74 | * @param int $id
75 | * @return \Illuminate\Http\Response
76 | */
77 | public function update(Request $request, $id)
78 | {
79 | $store = Store::findOrFail($id);
80 | $store->fill(\Input::all());
81 | $store->save();
82 | \Alert::success('Your requested store info has been updated.', 'Store Info Updated !');
83 | return \Redirect::to('/stores');
84 | }
85 |
86 | /**
87 | * Remove the specified resource from storage.
88 | *
89 | * @param int $id
90 | * @return \Illuminate\Http\Response
91 | */
92 | public function destroy($id)
93 | {
94 | $store = Store::findOrFail($id);
95 | $store->delete();
96 | \Alert::info('Your requested store has been deleted.', 'Store Deleted !');
97 | return \Redirect::to('/stores');
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/app/Http/Controllers/SuppliersController.php:
--------------------------------------------------------------------------------
1 | create($request->all());
43 | \Alert::success('Your requested supplier has been created.', 'Supplier Created !');
44 | return redirect('/suppliers');
45 | }
46 |
47 | /**
48 | * Display the specified resource.
49 | *
50 | * @param int $id
51 | * @return \Illuminate\Http\Response
52 | */
53 | public function show($id)
54 | {
55 | //
56 | }
57 |
58 | /**
59 | * Show the form for editing the specified resource.
60 | *
61 | * @param int $id
62 | * @return \Illuminate\Http\Response
63 | */
64 | public function edit($id)
65 | {
66 | $supplier = Supplier::findOrFail($id);
67 | return view('suppliers.edit', compact('supplier'));
68 | }
69 |
70 | /**
71 | * Update the specified resource in storage.
72 | *
73 | * @param \Illuminate\Http\Request $request
74 | * @param int $id
75 | * @return \Illuminate\Http\Response
76 | */
77 | public function update(Request $request, $id)
78 | {
79 | $supplier = Supplier::findOrFail($id);
80 | $supplier->fill(\Input::all());
81 | $supplier->save();
82 | \Alert::success('Your requested supplier info has been updated.', 'Supplier Info Updated !');
83 | return \Redirect::to('/suppliers');
84 | }
85 |
86 | /**
87 | * Remove the specified resource from storage.
88 | *
89 | * @param int $id
90 | * @return \Illuminate\Http\Response
91 | */
92 | public function destroy($id)
93 | {
94 | $supplier = Supplier::findOrFail($id);
95 | $supplier->delete();
96 | \Alert::info('Your requested supplier has been deleted.', 'Supplier Deleted !');
97 | return \Redirect::to('/suppliers');
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/app/Http/Controllers/UsersController.php:
--------------------------------------------------------------------------------
1 | role != 'Admin')
21 | return \Redirect::to('/');
22 | $users = User::paginate(150);
23 | return view('users.index', compact('users'));
24 | }
25 |
26 | /**
27 | * Show the form for creating a new resource.
28 | *
29 | * @return \Illuminate\Http\Response
30 | */
31 | public function create()
32 | {
33 | if (\Auth::user()->role != 'Admin')
34 | return \Redirect::to('/');
35 | return view('users.create');
36 | }
37 |
38 | /**
39 | * Store a newly created resource in storage.
40 | *
41 | * @param \Illuminate\Http\Request $request
42 | * @return \Illuminate\Http\Response
43 | */
44 | public function store(Request $request)
45 | {
46 | if (\Auth::user()->role != 'Admin')
47 | return \Redirect::to('/');
48 | $user = new User;
49 | $user->name = \Input::get('name');
50 | $user->username = \Input::get('username');
51 | $user->phone = \Input::get('phone');
52 | $user->address = \Input::get('address');
53 | $user->role = \Input::get('role');
54 | $user->password = bcrypt(\Input::get('password'));
55 | if (\Input::get('password') == \Input::get('password_confirmation')) {
56 | $user->save();
57 | \Alert::success('Your requested user has been created.', 'User Created !');
58 | }
59 | return \Redirect::to('/users');
60 | }
61 |
62 | /**
63 | * Display the specified resource.
64 | *
65 | * @param int $id
66 | * @return \Illuminate\Http\Response
67 | */
68 | public function show($id)
69 | {
70 | return \Redirect::to('/');
71 | }
72 |
73 | /**
74 | * Show the form for editing the specified resource.
75 | *
76 | * @param int $id
77 | * @return \Illuminate\Http\Response
78 | */
79 | public function edit($id)
80 | {
81 | if (\Auth::user()->role != 'Admin')
82 | return \Redirect::to('/');
83 | $user = User::findOrFail($id);
84 | return view('users.edit', compact('user'));
85 | }
86 |
87 | /**
88 | * Update the specified resource in storage.
89 | *
90 | * @param \Illuminate\Http\Request $request
91 | * @param int $id
92 | * @return \Illuminate\Http\Response
93 | */
94 | public function update(Request $request, $id)
95 | {
96 | if (\Auth::user()->role != 'Admin')
97 | return \Redirect::to('/');
98 | $user = User::findOrFail($id);
99 | $user->name = \Input::get('name');
100 | $user->email = \Input::get('email');
101 | $user->role = \Input::get('role');
102 | $user->password = bcrypt(\Input::get('password'));
103 | if (\Input::get('password') == \Input::get('password_confirmation')) {
104 | $user->save();
105 | \Alert::success('Your requested user has been updated.', 'User Updated !');
106 | }
107 | return \Redirect::to('/users');
108 | }
109 |
110 | /**
111 | * Remove the specified resource from storage.
112 | *
113 | * @param int $id
114 | * @return \Illuminate\Http\Response
115 | */
116 | public function destroy($id)
117 | {
118 | if (\Auth::user()->role != 'Admin')
119 | return \Redirect::to('/');
120 | $user = User::findOrFail($id);
121 | $user->delete();
122 | \Alert::info('Your requested user has been deleted.', 'User Deleted !');
123 | return \Redirect::to('/users');
124 | }
125 |
126 | /**
127 | * Remove the specified resource from storage.
128 | *
129 | * @param int $id
130 | * @return \Illuminate\Http\Response
131 | */
132 | public function dbBackup()
133 | {
134 | if (\Auth::user()->role != 'Admin')
135 | return \Redirect::to('/');
136 | $file = storage_path('database.sqlite');
137 | if (file_exists($file)) {
138 | header('Content-Description: File Transfer');
139 | header('Content-Type: application/octet-stream');
140 | header('Content-Disposition: attachment; filename="'.basename($file).'"');
141 | header('Expires: 0');
142 | header('Cache-Control: must-revalidate');
143 | header('Pragma: public');
144 | header('Content-Length: ' . filesize($file));
145 | readfile($file);
146 | exit;
147 | }
148 | }
149 | }
150 |
--------------------------------------------------------------------------------
/app/Http/Kernel.php:
--------------------------------------------------------------------------------
1 | [
27 | \App\Http\Middleware\EncryptCookies::class,
28 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
29 | \Illuminate\Session\Middleware\StartSession::class,
30 | \Illuminate\View\Middleware\ShareErrorsFromSession::class,
31 | \App\Http\Middleware\VerifyCsrfToken::class,
32 | ],
33 |
34 | 'api' => [
35 | 'throttle:60,1',
36 | ],
37 | ];
38 |
39 | /**
40 | * The application's route middleware.
41 | *
42 | * These middleware may be assigned to groups or used individually.
43 | *
44 | * @var array
45 | */
46 | protected $routeMiddleware = [
47 | 'auth' => \App\Http\Middleware\Authenticate::class,
48 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
49 | 'can' => \Illuminate\Foundation\Http\Middleware\Authorize::class,
50 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
51 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
52 | ];
53 | }
54 |
--------------------------------------------------------------------------------
/app/Http/Middleware/Authenticate.php:
--------------------------------------------------------------------------------
1 | guest()) {
21 | if ($request->ajax() || $request->wantsJson()) {
22 | return response('Unauthorized.', 401);
23 | } else {
24 | return redirect()->guest('login');
25 | }
26 | }
27 |
28 | return $next($request);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/Http/Middleware/EncryptCookies.php:
--------------------------------------------------------------------------------
1 | check()) {
21 | return redirect('/');
22 | }
23 |
24 | return $next($request);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Middleware/VerifyCsrfToken.php:
--------------------------------------------------------------------------------
1 | 'auth'], function() {
14 |
15 | Route::resource('/products', 'ProductsController');
16 | Route::resource('/customers', 'CustomersController');
17 | Route::resource('/users', 'UsersController');
18 | Route::resource('/suppliers', 'SuppliersController');
19 | Route::resource('/stores', 'StoresController');
20 | Route::resource('/stocks', 'StocksController');
21 | Route::resource('/orders', 'OrdersController');
22 | Route::resource('/refunds', 'RefundsController');
23 |
24 | Route::get('/db-backup', array('as' => 'db-backup', 'uses' => 'UsersController@dbBackup'));
25 |
26 | });
27 | // Authentication routes...
28 | Route::get( '/', function(){
29 | if (Auth::check())
30 | return \Redirect::to('products');
31 | return view('welcome');
32 | } );
33 | Route::get( '/login', [ 'as' => 'getLogin', 'uses' => 'Auth\AuthController@getLogin' ] );
34 | Route::post( '/login', [ 'as' => 'postLogin', 'uses' => 'Auth\AuthController@postLogin' ] );
35 | Route::get( '/logout', ['as' => 'logout', 'uses' => 'Auth\AuthController@getLogout'] );
--------------------------------------------------------------------------------
/app/Jobs/Job.php:
--------------------------------------------------------------------------------
1 | belongsToMany('App\Models\Product', 'orders_meta')->withPivot('price', 'tax', 'qty', 'row_total_price');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/Models/Product.php:
--------------------------------------------------------------------------------
1 | hasMany('App\Models\Stock', 'id');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/Models/Refund.php:
--------------------------------------------------------------------------------
1 | belongsToMany('App\Models\Product', 'refunds_meta')->withPivot('price', 'tax', 'qty', 'row_total_price');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/Models/Stock.php:
--------------------------------------------------------------------------------
1 | belongsTo('App\Models\Product', 'product_id');
23 | }
24 | /*
25 | * Get supplier details
26 | */
27 | public function supplier_details(){
28 | return $this->belongsTo('App\Models\Supplier', 'supplier_id');
29 | }
30 | /*
31 | * Get store details
32 | */
33 | public function store_details(){
34 | return $this->belongsTo('App\Models\Store', 'store_id');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/Models/Store.php:
--------------------------------------------------------------------------------
1 | hasMany('App\Models\Stock');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/Models/Supplier.php:
--------------------------------------------------------------------------------
1 | hasMany('App\Models\Stock');
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/Models/User.php:
--------------------------------------------------------------------------------
1 | 'App\Policies\ModelPolicy',
17 | ];
18 |
19 | /**
20 | * Register any application authentication / authorization services.
21 | *
22 | * @param \Illuminate\Contracts\Auth\Access\Gate $gate
23 | * @return void
24 | */
25 | public function boot(GateContract $gate)
26 | {
27 | $this->registerPolicies($gate);
28 |
29 | //
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/Providers/EventServiceProvider.php:
--------------------------------------------------------------------------------
1 | [
17 | 'App\Listeners\EventListener',
18 | ],
19 | ];
20 |
21 | /**
22 | * Register any other events for your application.
23 | *
24 | * @param \Illuminate\Contracts\Events\Dispatcher $events
25 | * @return void
26 | */
27 | public function boot(DispatcherContract $events)
28 | {
29 | parent::boot($events);
30 |
31 | //
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/Providers/RouteServiceProvider.php:
--------------------------------------------------------------------------------
1 | mapWebRoutes($router);
41 |
42 | //
43 | }
44 |
45 | /**
46 | * Define the "web" routes for the application.
47 | *
48 | * These routes all receive session state, CSRF protection, etc.
49 | *
50 | * @param \Illuminate\Routing\Router $router
51 | * @return void
52 | */
53 | protected function mapWebRoutes(Router $router)
54 | {
55 | $router->group([
56 | 'namespace' => $this->namespace, 'middleware' => 'web',
57 | ], function ($router) {
58 | require app_path('Http/routes.php');
59 | });
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/artisan:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | make(Illuminate\Contracts\Console\Kernel::class);
32 |
33 | $status = $kernel->handle(
34 | $input = new Symfony\Component\Console\Input\ArgvInput,
35 | new Symfony\Component\Console\Output\ConsoleOutput
36 | );
37 |
38 | /*
39 | |--------------------------------------------------------------------------
40 | | Shutdown The Application
41 | |--------------------------------------------------------------------------
42 | |
43 | | Once Artisan has finished running. We will fire off the shutdown events
44 | | so that any final work may be done by the application before we shut
45 | | down the process. This is the last thing to happen to the request.
46 | |
47 | */
48 |
49 | $kernel->terminate($input, $status);
50 |
51 | exit($status);
52 |
--------------------------------------------------------------------------------
/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/autoload.php:
--------------------------------------------------------------------------------
1 | =5.5.9",
9 | "laravel/framework": "5.2.*",
10 | "laravelcollective/html": "5.2.*",
11 | "barryvdh/laravel-dompdf": "0.6.*",
12 | "nesbot/carbon": "^1.21",
13 | "uxweb/sweet-alert": "~1.1"
14 | },
15 | "require-dev": {
16 | "fzaninotto/faker": "~1.4",
17 | "mockery/mockery": "0.9.*",
18 | "phpunit/phpunit": "5.4.*",
19 | "symfony/css-selector": "2.8.*|3.0.*",
20 | "symfony/dom-crawler": "2.8.*|3.0.*"
21 | },
22 | "autoload": {
23 | "classmap": [
24 | "database"
25 | ],
26 | "psr-4": {
27 | "App\\": "app/"
28 | }
29 | },
30 | "autoload-dev": {
31 | "classmap": [
32 | "tests/TestCase.php"
33 | ]
34 | },
35 | "scripts": {
36 | "post-root-package-install": [
37 | "php -r \"copy('.env.example', '.env');\""
38 | ],
39 | "post-create-project-cmd": [
40 | "php artisan key:generate"
41 | ],
42 | "post-install-cmd": [
43 | "Illuminate\\Foundation\\ComposerScripts::postInstall",
44 | "php artisan optimize"
45 | ],
46 | "post-update-cmd": [
47 | "Illuminate\\Foundation\\ComposerScripts::postUpdate",
48 | "php artisan optimize"
49 | ]
50 | },
51 | "config": {
52 | "preferred-install": "dist"
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/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", "token"
35 | |
36 | */
37 |
38 | 'guards' => [
39 | 'web' => [
40 | 'driver' => 'session',
41 | 'provider' => 'users',
42 | ],
43 |
44 | 'api' => [
45 | 'driver' => 'token',
46 | 'provider' => 'users',
47 | ],
48 | ],
49 |
50 | /*
51 | |--------------------------------------------------------------------------
52 | | User Providers
53 | |--------------------------------------------------------------------------
54 | |
55 | | All authentication drivers have a user provider. This defines how the
56 | | users are actually retrieved out of your database or other storage
57 | | mechanisms used by this application to persist your user's data.
58 | |
59 | | If you have multiple user tables or models you may configure multiple
60 | | sources which represent each model / table. These sources may then
61 | | be assigned to any extra authentication guards you have defined.
62 | |
63 | | Supported: "database", "eloquent"
64 | |
65 | */
66 |
67 | 'providers' => [
68 | 'users' => [
69 | 'driver' => 'eloquent',
70 | 'model' => App\Models\User::class,
71 | ],
72 |
73 | // 'users' => [
74 | // 'driver' => 'database',
75 | // 'table' => 'users',
76 | // ],
77 | ],
78 |
79 | /*
80 | |--------------------------------------------------------------------------
81 | | Resetting Passwords
82 | |--------------------------------------------------------------------------
83 | |
84 | | Here you may set the options for resetting passwords including the view
85 | | that is your password reset e-mail. You may also set the name of the
86 | | table that maintains all of the reset tokens for your application.
87 | |
88 | | You may specify multiple password reset configurations if you have more
89 | | than one user table or model in the application and you want to have
90 | | separate password reset settings based on the specific user types.
91 | |
92 | | The expire time is the number of minutes that the reset token should be
93 | | considered valid. This security feature keeps tokens short-lived so
94 | | they have less time to be guessed. You may change this as needed.
95 | |
96 | */
97 |
98 | 'passwords' => [
99 | 'users' => [
100 | 'provider' => 'users',
101 | 'email' => 'auth.emails.password',
102 | 'table' => 'password_resets',
103 | 'expire' => 60,
104 | ],
105 | ],
106 |
107 | ];
108 |
--------------------------------------------------------------------------------
/config/broadcasting.php:
--------------------------------------------------------------------------------
1 | env('BROADCAST_DRIVER', 'pusher'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Broadcast Connections
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may define all of the broadcast connections that will be used
24 | | to broadcast events to other systems or over websockets. Samples of
25 | | each available type of connection are provided inside this array.
26 | |
27 | */
28 |
29 | 'connections' => [
30 |
31 | 'pusher' => [
32 | 'driver' => 'pusher',
33 | 'key' => env('PUSHER_KEY'),
34 | 'secret' => env('PUSHER_SECRET'),
35 | 'app_id' => env('PUSHER_APP_ID'),
36 | 'options' => [
37 | //
38 | ],
39 | ],
40 |
41 | 'redis' => [
42 | 'driver' => 'redis',
43 | 'connection' => 'default',
44 | ],
45 |
46 | 'log' => [
47 | 'driver' => 'log',
48 | ],
49 |
50 | ],
51 |
52 | ];
53 |
--------------------------------------------------------------------------------
/config/cache.php:
--------------------------------------------------------------------------------
1 | env('CACHE_DRIVER', 'file'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Cache Stores
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may define all of the cache "stores" for your application as
24 | | well as their drivers. You may even define multiple stores for the
25 | | same cache driver to group types of items stored in your caches.
26 | |
27 | */
28 |
29 | 'stores' => [
30 |
31 | 'apc' => [
32 | 'driver' => 'apc',
33 | ],
34 |
35 | 'array' => [
36 | 'driver' => 'array',
37 | ],
38 |
39 | 'database' => [
40 | 'driver' => 'database',
41 | 'table' => 'cache',
42 | 'connection' => null,
43 | ],
44 |
45 | 'file' => [
46 | 'driver' => 'file',
47 | 'path' => storage_path('framework/cache'),
48 | ],
49 |
50 | 'memcached' => [
51 | 'driver' => 'memcached',
52 | 'servers' => [
53 | [
54 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
55 | 'port' => env('MEMCACHED_PORT', 11211),
56 | 'weight' => 100,
57 | ],
58 | ],
59 | ],
60 |
61 | 'redis' => [
62 | 'driver' => 'redis',
63 | 'connection' => 'default',
64 | ],
65 |
66 | ],
67 |
68 | /*
69 | |--------------------------------------------------------------------------
70 | | Cache Key Prefix
71 | |--------------------------------------------------------------------------
72 | |
73 | | When utilizing a RAM based store such as APC or Memcached, there might
74 | | be other applications utilizing the same cache. So, we'll specify a
75 | | value to get prefixed to all our keys so we can avoid collisions.
76 | |
77 | */
78 |
79 | 'prefix' => 'laravel',
80 |
81 | ];
82 |
--------------------------------------------------------------------------------
/config/compile.php:
--------------------------------------------------------------------------------
1 | [
17 | //
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled File Providers
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may list service providers which define a "compiles" function
26 | | that returns additional files that should be compiled, providing an
27 | | easy way to get common files from any packages you are utilizing.
28 | |
29 | */
30 |
31 | 'providers' => [
32 | //
33 | ],
34 |
35 | ];
36 |
--------------------------------------------------------------------------------
/config/database.php:
--------------------------------------------------------------------------------
1 | PDO::FETCH_CLASS,
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Default Database Connection Name
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may specify which of the database connections below you wish
24 | | to use as your default connection for all database work. Of course
25 | | you may use many connections at once using the Database library.
26 | |
27 | */
28 |
29 | 'default' => env('DB_CONNECTION', 'mysql'),
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Database Connections
34 | |--------------------------------------------------------------------------
35 | |
36 | | Here are each of the database connections setup for your application.
37 | | Of course, examples of configuring each database platform that is
38 | | supported by Laravel is shown below to make development simple.
39 | |
40 | |
41 | | All database work in Laravel is done through the PHP PDO facilities
42 | | so make sure you have the driver for your particular database of
43 | | choice installed on your machine before you begin development.
44 | |
45 | */
46 |
47 | 'connections' => [
48 |
49 | 'sqlite' => [
50 | 'driver' => 'sqlite',
51 | 'database' => env('DB_DATABASE', database_path('database.sqlite')),
52 | 'prefix' => '',
53 | ],
54 |
55 | 'mysql' => [
56 | 'driver' => 'mysql',
57 | 'host' => env('DB_HOST', 'localhost'),
58 | 'port' => env('DB_PORT', '3306'),
59 | 'database' => env('DB_DATABASE', 'forge'),
60 | 'username' => env('DB_USERNAME', 'forge'),
61 | 'password' => env('DB_PASSWORD', ''),
62 | 'charset' => 'utf8',
63 | 'collation' => 'utf8_unicode_ci',
64 | 'prefix' => '',
65 | 'strict' => false,
66 | 'engine' => null,
67 | ],
68 |
69 | 'pgsql' => [
70 | 'driver' => 'pgsql',
71 | 'host' => env('DB_HOST', 'localhost'),
72 | 'port' => env('DB_PORT', '5432'),
73 | 'database' => env('DB_DATABASE', 'forge'),
74 | 'username' => env('DB_USERNAME', 'forge'),
75 | 'password' => env('DB_PASSWORD', ''),
76 | 'charset' => 'utf8',
77 | 'prefix' => '',
78 | 'schema' => 'public',
79 | ],
80 |
81 | 'testing' => [
82 | 'driver' => 'mysql',
83 | 'host' => env('DB_TEST_HOST', 'localhost'),
84 | 'database' => env('DB_TEST_DATABASE', 'homestead_test'),
85 | 'username' => env('DB_TEST_USERNAME', 'homestead'),
86 | 'password' => env('DB_TEST_PASSWORD', 'secret'),
87 | 'charset' => 'utf8',
88 | 'collation' => 'utf8_unicode_ci',
89 | 'prefix' => '',
90 | 'strict' => false,
91 | ],
92 |
93 | ],
94 |
95 | /*
96 | |--------------------------------------------------------------------------
97 | | Migration Repository Table
98 | |--------------------------------------------------------------------------
99 | |
100 | | This table keeps track of all the migrations that have already run for
101 | | your application. Using this information, we can determine which of
102 | | the migrations on disk haven't actually been run in the database.
103 | |
104 | */
105 |
106 | 'migrations' => 'migrations',
107 |
108 | /*
109 | |--------------------------------------------------------------------------
110 | | Redis Databases
111 | |--------------------------------------------------------------------------
112 | |
113 | | Redis is an open source, fast, and advanced key-value store that also
114 | | provides a richer set of commands than a typical key-value systems
115 | | such as APC or Memcached. Laravel makes it easy to dig right in.
116 | |
117 | */
118 |
119 | 'redis' => [
120 |
121 | 'cluster' => false,
122 |
123 | 'default' => [
124 | 'host' => env('REDIS_HOST', 'localhost'),
125 | 'password' => env('REDIS_PASSWORD', null),
126 | 'port' => env('REDIS_PORT', 6379),
127 | 'database' => 0,
128 | ],
129 |
130 | ],
131 |
132 | ];
133 |
--------------------------------------------------------------------------------
/config/filesystems.php:
--------------------------------------------------------------------------------
1 | 'local',
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Default Cloud Filesystem Disk
23 | |--------------------------------------------------------------------------
24 | |
25 | | Many applications store files both locally and in the cloud. For this
26 | | reason, you may specify a default "cloud" driver here. This driver
27 | | will be bound as the Cloud disk implementation in the container.
28 | |
29 | */
30 |
31 | 'cloud' => 's3',
32 |
33 | /*
34 | |--------------------------------------------------------------------------
35 | | Filesystem Disks
36 | |--------------------------------------------------------------------------
37 | |
38 | | Here you may configure as many filesystem "disks" as you wish, and you
39 | | may even configure multiple disks of the same driver. Defaults have
40 | | been setup for each driver as an example of the required options.
41 | |
42 | */
43 |
44 | 'disks' => [
45 |
46 | 'local' => [
47 | 'driver' => 'local',
48 | 'root' => storage_path('app'),
49 | ],
50 |
51 | 'public' => [
52 | 'driver' => 'local',
53 | 'root' => storage_path('app/public'),
54 | 'visibility' => 'public',
55 | ],
56 |
57 | 's3' => [
58 | 'driver' => 's3',
59 | 'key' => 'your-key',
60 | 'secret' => 'your-secret',
61 | 'region' => 'your-region',
62 | 'bucket' => 'your-bucket',
63 | ],
64 |
65 | ],
66 |
67 | ];
68 |
--------------------------------------------------------------------------------
/config/mail.php:
--------------------------------------------------------------------------------
1 | env('MAIL_DRIVER', 'smtp'),
20 |
21 | /*
22 | |--------------------------------------------------------------------------
23 | | SMTP Host Address
24 | |--------------------------------------------------------------------------
25 | |
26 | | Here you may provide the host address of the SMTP server used by your
27 | | applications. A default option is provided that is compatible with
28 | | the Mailgun mail service which will provide reliable deliveries.
29 | |
30 | */
31 |
32 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
33 |
34 | /*
35 | |--------------------------------------------------------------------------
36 | | SMTP Host Port
37 | |--------------------------------------------------------------------------
38 | |
39 | | This is the SMTP port used by your application to deliver e-mails to
40 | | users of the application. Like the host we have set this value to
41 | | stay compatible with the Mailgun e-mail application by default.
42 | |
43 | */
44 |
45 | 'port' => env('MAIL_PORT', 587),
46 |
47 | /*
48 | |--------------------------------------------------------------------------
49 | | Global "From" Address
50 | |--------------------------------------------------------------------------
51 | |
52 | | You may wish for all e-mails sent by your application to be sent from
53 | | the same address. Here, you may specify a name and address that is
54 | | used globally for all e-mails that are sent by your application.
55 | |
56 | */
57 |
58 | 'from' => ['address' => null, 'name' => null],
59 |
60 | /*
61 | |--------------------------------------------------------------------------
62 | | E-Mail Encryption Protocol
63 | |--------------------------------------------------------------------------
64 | |
65 | | Here you may specify the encryption protocol that should be used when
66 | | the application send e-mail messages. A sensible default using the
67 | | transport layer security protocol should provide great security.
68 | |
69 | */
70 |
71 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'),
72 |
73 | /*
74 | |--------------------------------------------------------------------------
75 | | SMTP Server Username
76 | |--------------------------------------------------------------------------
77 | |
78 | | If your SMTP server requires a username for authentication, you should
79 | | set it here. This will get used to authenticate with your server on
80 | | connection. You may also set the "password" value below this one.
81 | |
82 | */
83 |
84 | 'username' => env('MAIL_USERNAME'),
85 |
86 | /*
87 | |--------------------------------------------------------------------------
88 | | SMTP Server Password
89 | |--------------------------------------------------------------------------
90 | |
91 | | Here you may set the password required by your SMTP server to send out
92 | | messages from your application. This will be given to the server on
93 | | connection so that the application will be able to send messages.
94 | |
95 | */
96 |
97 | 'password' => env('MAIL_PASSWORD'),
98 |
99 | /*
100 | |--------------------------------------------------------------------------
101 | | Sendmail System Path
102 | |--------------------------------------------------------------------------
103 | |
104 | | When using the "sendmail" driver to send e-mails, we will need to know
105 | | the path to where Sendmail lives on this server. A default path has
106 | | been provided here, which will work well on most of your systems.
107 | |
108 | */
109 |
110 | 'sendmail' => '/usr/sbin/sendmail -bs',
111 |
112 | ];
113 |
--------------------------------------------------------------------------------
/config/queue.php:
--------------------------------------------------------------------------------
1 | env('QUEUE_DRIVER', 'sync'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Queue Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may configure the connection information for each server that
26 | | is used by your application. A default configuration has been added
27 | | for each back-end shipped with Laravel. You are free to add more.
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 | 'expire' => 60,
42 | ],
43 |
44 | 'beanstalkd' => [
45 | 'driver' => 'beanstalkd',
46 | 'host' => 'localhost',
47 | 'queue' => 'default',
48 | 'ttr' => 60,
49 | ],
50 |
51 | 'sqs' => [
52 | 'driver' => 'sqs',
53 | 'key' => 'your-public-key',
54 | 'secret' => 'your-secret-key',
55 | 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
56 | 'queue' => 'your-queue-name',
57 | 'region' => 'us-east-1',
58 | ],
59 |
60 | 'redis' => [
61 | 'driver' => 'redis',
62 | 'connection' => 'default',
63 | 'queue' => 'default',
64 | 'expire' => 60,
65 | ],
66 |
67 | ],
68 |
69 | /*
70 | |--------------------------------------------------------------------------
71 | | Failed Queue Jobs
72 | |--------------------------------------------------------------------------
73 | |
74 | | These options configure the behavior of failed queue job logging so you
75 | | can control which database and table are used to store the jobs that
76 | | have failed. You may change them to any database / table you wish.
77 | |
78 | */
79 |
80 | 'failed' => [
81 | 'database' => env('DB_CONNECTION', 'mysql'),
82 | 'table' => 'failed_jobs',
83 | ],
84 |
85 | ];
86 |
--------------------------------------------------------------------------------
/config/services.php:
--------------------------------------------------------------------------------
1 | [
18 | 'domain' => env('MAILGUN_DOMAIN'),
19 | 'secret' => env('MAILGUN_SECRET'),
20 | ],
21 |
22 | 'ses' => [
23 | 'key' => env('SES_KEY'),
24 | 'secret' => env('SES_SECRET'),
25 | 'region' => 'us-east-1',
26 | ],
27 |
28 | 'sparkpost' => [
29 | 'secret' => env('SPARKPOST_SECRET'),
30 | ],
31 |
32 | 'stripe' => [
33 | 'model' => App\User::class,
34 | 'key' => env('STRIPE_KEY'),
35 | 'secret' => env('STRIPE_SECRET'),
36 | ],
37 |
38 | ];
39 |
--------------------------------------------------------------------------------
/config/session.php:
--------------------------------------------------------------------------------
1 | env('SESSION_DRIVER', 'file'),
20 |
21 | /*
22 | |--------------------------------------------------------------------------
23 | | Session Lifetime
24 | |--------------------------------------------------------------------------
25 | |
26 | | Here you may specify the number of minutes that you wish the session
27 | | to be allowed to remain idle before it expires. If you want them
28 | | to immediately expire on the browser closing, set that option.
29 | |
30 | */
31 |
32 | 'lifetime' => 120,
33 |
34 | 'expire_on_close' => false,
35 |
36 | /*
37 | |--------------------------------------------------------------------------
38 | | Session Encryption
39 | |--------------------------------------------------------------------------
40 | |
41 | | This option allows you to easily specify that all of your session data
42 | | should be encrypted before it is stored. All encryption will be run
43 | | automatically by Laravel and you can use the Session like normal.
44 | |
45 | */
46 |
47 | 'encrypt' => false,
48 |
49 | /*
50 | |--------------------------------------------------------------------------
51 | | Session File Location
52 | |--------------------------------------------------------------------------
53 | |
54 | | When using the native session driver, we need a location where session
55 | | files may be stored. A default has been set for you but a different
56 | | location may be specified. This is only needed for file sessions.
57 | |
58 | */
59 |
60 | 'files' => storage_path('framework/sessions'),
61 |
62 | /*
63 | |--------------------------------------------------------------------------
64 | | Session Database Connection
65 | |--------------------------------------------------------------------------
66 | |
67 | | When using the "database" or "redis" session drivers, you may specify a
68 | | connection that should be used to manage these sessions. This should
69 | | correspond to a connection in your database configuration options.
70 | |
71 | */
72 |
73 | 'connection' => null,
74 |
75 | /*
76 | |--------------------------------------------------------------------------
77 | | Session Database Table
78 | |--------------------------------------------------------------------------
79 | |
80 | | When using the "database" session driver, you may specify the table we
81 | | should use to manage the sessions. Of course, a sensible default is
82 | | provided for you; however, you are free to change this as needed.
83 | |
84 | */
85 |
86 | 'table' => 'sessions',
87 |
88 | /*
89 | |--------------------------------------------------------------------------
90 | | Session Sweeping Lottery
91 | |--------------------------------------------------------------------------
92 | |
93 | | Some session drivers must manually sweep their storage location to get
94 | | rid of old sessions from storage. Here are the chances that it will
95 | | happen on a given request. By default, the odds are 2 out of 100.
96 | |
97 | */
98 |
99 | 'lottery' => [2, 100],
100 |
101 | /*
102 | |--------------------------------------------------------------------------
103 | | Session Cookie Name
104 | |--------------------------------------------------------------------------
105 | |
106 | | Here you may change the name of the cookie used to identify a session
107 | | instance by ID. The name specified here will get used every time a
108 | | new session cookie is created by the framework for every driver.
109 | |
110 | */
111 |
112 | 'cookie' => 'laravel_session',
113 |
114 | /*
115 | |--------------------------------------------------------------------------
116 | | Session Cookie Path
117 | |--------------------------------------------------------------------------
118 | |
119 | | The session cookie path determines the path for which the cookie will
120 | | be regarded as available. Typically, this will be the root path of
121 | | your application but you are free to change this when necessary.
122 | |
123 | */
124 |
125 | 'path' => '/',
126 |
127 | /*
128 | |--------------------------------------------------------------------------
129 | | Session Cookie Domain
130 | |--------------------------------------------------------------------------
131 | |
132 | | Here you may change the domain of the cookie used to identify a session
133 | | in your application. This will determine which domains the cookie is
134 | | available to in your application. A sensible default has been set.
135 | |
136 | */
137 |
138 | 'domain' => null,
139 |
140 | /*
141 | |--------------------------------------------------------------------------
142 | | HTTPS Only Cookies
143 | |--------------------------------------------------------------------------
144 | |
145 | | By setting this option to true, session cookies will only be sent back
146 | | to the server if the browser has a HTTPS connection. This will keep
147 | | the cookie from being sent to you if it can not be done securely.
148 | |
149 | */
150 |
151 | 'secure' => false,
152 |
153 | /*
154 | |--------------------------------------------------------------------------
155 | | HTTP Access Only
156 | |--------------------------------------------------------------------------
157 | |
158 | | Setting this value to true will prevent JavaScript from accessing the
159 | | value of the cookie and the cookie will only be accessible through
160 | | the HTTP protocol. You are free to modify this option if needed.
161 | |
162 | */
163 |
164 | 'http_only' => true,
165 |
166 | ];
167 |
--------------------------------------------------------------------------------
/config/view.php:
--------------------------------------------------------------------------------
1 | [
17 | realpath(base_path('resources/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' => realpath(storage_path('framework/views')),
32 |
33 | ];
34 |
--------------------------------------------------------------------------------
/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite
2 |
--------------------------------------------------------------------------------
/database/factories/ModelFactory.php:
--------------------------------------------------------------------------------
1 | define(App\User::class, function (Faker\Generator $faker) {
15 | return [
16 | 'name' => $faker->name,
17 | 'email' => $faker->safeEmail,
18 | 'password' => bcrypt(str_random(10)),
19 | 'remember_token' => str_random(10),
20 | ];
21 | });
22 |
--------------------------------------------------------------------------------
/database/migrations/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_000000_create_users_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
17 | $table->string('name');
18 | $table->string('username')->unique();
19 | $table->string('phone');
20 | $table->longText('address');
21 | $table->string('password', 60);
22 | $table->enum('role', ['Admin', 'Manager']);
23 | $table->rememberToken();
24 | $table->timestamps();
25 | });
26 | }
27 |
28 | /**
29 | * Reverse the migrations.
30 | *
31 | * @return void
32 | */
33 | public function down()
34 | {
35 | Schema::drop('users');
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_100000_create_password_resets_table.php:
--------------------------------------------------------------------------------
1 | string('email')->index();
17 | $table->string('token')->index();
18 | $table->timestamp('created_at');
19 | });
20 | }
21 |
22 | /**
23 | * Reverse the migrations.
24 | *
25 | * @return void
26 | */
27 | public function down()
28 | {
29 | Schema::drop('password_resets');
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/database/migrations/2016_06_20_221515_create_products_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
17 | $table->string('name');
18 | $table->longText('description');
19 | $table->timestamps();
20 | });
21 | }
22 |
23 | /**
24 | * Reverse the migrations.
25 | *
26 | * @return void
27 | */
28 | public function down()
29 | {
30 | Schema::drop('products');
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/database/migrations/2016_06_29_172010_create_customers_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
17 | $table->string('name');
18 | $table->longText('address');
19 | $table->string('phone');
20 | $table->longText('description');
21 | $table->timestamps();
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | *
28 | * @return void
29 | */
30 | public function down()
31 | {
32 | Schema::drop('customers');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/2016_06_30_100442_create_suppliers_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
17 | $table->string('name');
18 | $table->string('phone');
19 | $table->longText('address');
20 | $table->longText('description');
21 | $table->timestamps();
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | *
28 | * @return void
29 | */
30 | public function down()
31 | {
32 | Schema::drop('suppliers');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/2016_07_01_163541_create_stores_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
17 | $table->string('name');
18 | $table->longText('address');
19 | $table->longText('description');
20 | $table->timestamps();
21 | });
22 | }
23 |
24 | /**
25 | * Reverse the migrations.
26 | *
27 | * @return void
28 | */
29 | public function down()
30 | {
31 | Schema::drop('stores');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/database/migrations/2016_07_01_202523_create_stocks_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
17 | $table->integer('product_id')->unsigned();
18 | $table->foreign('product_id')->references('id')->on('products');
19 | $table->integer('supplier_id')->unsigned();
20 | $table->foreign('supplier_id')->references('id')->on('suppliers');
21 | $table->integer('store_id')->unsigned();
22 | $table->foreign('store_id')->references('id')->on('stores');
23 | $table->integer('qty');
24 | $table->decimal('purchase_price', 5, 2);
25 | $table->decimal('retail_price', 5, 2);
26 | $table->timestamps();
27 | });
28 | }
29 |
30 | /**
31 | * Reverse the migrations.
32 | *
33 | * @return void
34 | */
35 | public function down()
36 | {
37 | Schema::drop('stocks');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/database/migrations/2016_07_21_105746_create_orders_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
17 | $table->integer('customer_id')->unsigned()->nullable();
18 | $table->foreign('customer_id')->references('id')->on('customers');
19 | $table->string('customer_name');
20 | $table->string('customer_phone');
21 | $table->longText('customer_address');
22 | $table->decimal('total', 15, 2);
23 | $table->decimal('grandtotal_vat', 15, 2);
24 | $table->decimal('delivery', 15, 2);
25 | $table->decimal('grandtotal', 15, 2);
26 | $table->timestamps();
27 | });
28 | }
29 |
30 | /**
31 | * Reverse the migrations.
32 | *
33 | * @return void
34 | */
35 | public function down()
36 | {
37 | Schema::drop('orders');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/database/migrations/2016_07_21_110001_create_orders_meta_table.php:
--------------------------------------------------------------------------------
1 | integer('product_id')->unsigned();
17 | $table->foreign('product_id')->references('id')->on('products');
18 | $table->integer('order_id')->unsigned();
19 | $table->foreign('order_id')->references('id')->on('orders')->onDelete('cascade');
20 | $table->decimal('price', 15, 2);
21 | $table->decimal('qty', 15, 2);
22 | $table->decimal('vat', 15, 2);
23 | $table->decimal('row_total_price', 15, 2);
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::drop('orders_meta');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/migrations/2016_07_22_104834_create_refunds_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
17 | $table->integer('order_id')->unsigned()->nullable();
18 | $table->foreign('order_id')->references('id')->on('orders')->onDelete('cascade');
19 | $table->integer('customer_id')->unsigned()->nullable();
20 | $table->foreign('customer_id')->references('id')->on('customers');
21 | $table->string('customer_name');
22 | $table->string('customer_phone');
23 | $table->longText('customer_address');
24 | $table->decimal('total', 15, 2);
25 | $table->decimal('grandtotal_vat', 15, 2);
26 | $table->decimal('delivery', 15, 2);
27 | $table->decimal('grandtotal', 15, 2);
28 | $table->timestamps();
29 | });
30 | }
31 |
32 | /**
33 | * Reverse the migrations.
34 | *
35 | * @return void
36 | */
37 | public function down()
38 | {
39 | Schema::drop('refunds');
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/database/migrations/2016_07_22_105250_create_refunds_meta_table.php:
--------------------------------------------------------------------------------
1 | integer('product_id')->unsigned();
17 | $table->foreign('product_id')->references('id')->on('products');
18 | $table->integer('refund_id')->unsigned();
19 | $table->foreign('refund_id')->references('id')->on('refunds')->onDelete('cascade');
20 | $table->decimal('price', 15, 2);
21 | $table->decimal('qty', 15, 2);
22 | $table->decimal('vat', 15, 2);
23 | $table->decimal('row_total_price', 15, 2);
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::drop('refunds_meta');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/seeds/.gitkeep:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/database/seeds/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | call(UsersTableSeeder::class);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/gulpfile.js:
--------------------------------------------------------------------------------
1 | var elixir = require('laravel-elixir');
2 |
3 | /*
4 | |--------------------------------------------------------------------------
5 | | Elixir Asset Management
6 | |--------------------------------------------------------------------------
7 | |
8 | | Elixir provides a clean, fluent API for defining some basic Gulp tasks
9 | | for your Laravel application. By default, we are compiling the Sass
10 | | file for our application, as well as publishing vendor resources.
11 | |
12 | */
13 |
14 | elixir.extend('sourcemaps', false);
15 |
16 | elixir(function(mix) {
17 | mix.sass('app.scss');
18 | mix.scripts([
19 | '/../../../node_modules/jquery/dist/jquery.js',
20 | '/../../../node_modules/bootstrap-sass/assets/javascripts/bootstrap.min.js',
21 | '/../../../node_modules/sweetalert/dist/sweetalert.min.js',
22 | '/../../../node_modules/jquery-ui-bundle/jquery-ui.min.js'
23 | ], 'public/js/top.js');
24 | mix.scripts([
25 | '/../../../node_modules/jquery.nicescroll/jquery.nicescroll.min.js',
26 | '/../../../node_modules/icheck/icheck.min.js',
27 | '/../../../node_modules/datatables/media/js/jquery.dataTables.min.js',
28 | '/../../../node_modules/datatables-tabletools/js/dataTables.tableTools.js',
29 | '/../../../node_modules/moment/min/moment.min.js',
30 | '/../../../node_modules/daterangepicker/daterangepicker.min.js',
31 | '/../../../node_modules/select2/dist/js/select2.min.js',
32 | '/../../../node_modules/accounting/accounting.min.js',
33 | '/../../../node_modules/sortablejs/Sortable.min.js',
34 | '/../../../node_modules/vue/dist/vue.js',
35 | 'validator.js',
36 | 'app.js',
37 | ], 'public/js/bottom.js');
38 | });
39 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "prod": "gulp --production",
5 | "dev": "gulp watch"
6 | },
7 | "devDependencies": {
8 | "gulp": "^3.9.1",
9 | "laravel-elixir": "^5.0.0"
10 | },
11 | "dependencies": {
12 | "animate.scss": "0.0.6",
13 | "accounting": "^0.4.1",
14 | "bootstrap-sass": "^3.0.0",
15 | "datatables": "^1.10.12",
16 | "datatables-tabletools": "^2.2.2",
17 | "daterangepicker": "0.0.3",
18 | "font-awesome": "^4.6.3",
19 | "icheck": "^1.0.2",
20 | "jquery": "^2.2.4",
21 | "jquery-ui-bundle": "^1.11.4",
22 | "jquery.nicescroll": "^3.6.8",
23 | "moment": "^2.14.1",
24 | "select2": "^4.0.3",
25 | "sortablejs": "^1.4.2",
26 | "sweetalert": "^1.1.3",
27 | "validator": "^5.5.0",
28 | "vue": "^1.0.26"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 | ./tests
14 |
15 |
16 |
17 |
18 | ./app
19 |
20 | ./app/Http/routes.php
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 |
3 | Options -MultiViews
4 |
5 |
6 | RewriteEngine On
7 |
8 | # Redirect Trailing Slashes If Not A Folder...
9 | RewriteCond %{REQUEST_FILENAME} !-d
10 | RewriteRule ^(.*)/$ /$1 [L,R=301]
11 |
12 | # Handle Front Controller...
13 | RewriteCond %{REQUEST_FILENAME} !-d
14 | RewriteCond %{REQUEST_FILENAME} !-f
15 | RewriteRule ^ index.php [L]
16 |
17 | # Handle Authorization Header
18 | RewriteCond %{HTTP:Authorization} .
19 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
20 |
21 |
--------------------------------------------------------------------------------
/public/css/green.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/green.png
--------------------------------------------------------------------------------
/public/css/green@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/green@2x.png
--------------------------------------------------------------------------------
/public/css/images/back_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/back_disabled.png
--------------------------------------------------------------------------------
/public/css/images/back_enabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/back_enabled.png
--------------------------------------------------------------------------------
/public/css/images/back_enabled_hover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/back_enabled_hover.png
--------------------------------------------------------------------------------
/public/css/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/favicon.ico
--------------------------------------------------------------------------------
/public/css/images/forward_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/forward_disabled.png
--------------------------------------------------------------------------------
/public/css/images/forward_enabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/forward_enabled.png
--------------------------------------------------------------------------------
/public/css/images/forward_enabled_hover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/forward_enabled_hover.png
--------------------------------------------------------------------------------
/public/css/images/sort_asc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/sort_asc.png
--------------------------------------------------------------------------------
/public/css/images/sort_asc_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/sort_asc_disabled.png
--------------------------------------------------------------------------------
/public/css/images/sort_both.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/sort_both.png
--------------------------------------------------------------------------------
/public/css/images/sort_desc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/sort_desc.png
--------------------------------------------------------------------------------
/public/css/images/sort_desc_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/sort_desc_disabled.png
--------------------------------------------------------------------------------
/public/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png
--------------------------------------------------------------------------------
/public/css/images/ui-bg_diagonals-thick_20_666666_40x40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/ui-bg_diagonals-thick_20_666666_40x40.png
--------------------------------------------------------------------------------
/public/css/images/ui-bg_flat_10_000000_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/ui-bg_flat_10_000000_40x100.png
--------------------------------------------------------------------------------
/public/css/images/ui-bg_glass_100_f6f6f6_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/ui-bg_glass_100_f6f6f6_1x400.png
--------------------------------------------------------------------------------
/public/css/images/ui-bg_glass_100_fdf5ce_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/ui-bg_glass_100_fdf5ce_1x400.png
--------------------------------------------------------------------------------
/public/css/images/ui-bg_glass_65_ffffff_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/ui-bg_glass_65_ffffff_1x400.png
--------------------------------------------------------------------------------
/public/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png
--------------------------------------------------------------------------------
/public/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
--------------------------------------------------------------------------------
/public/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
--------------------------------------------------------------------------------
/public/css/images/ui-icons_222222_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/ui-icons_222222_256x240.png
--------------------------------------------------------------------------------
/public/css/images/ui-icons_228ef1_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/ui-icons_228ef1_256x240.png
--------------------------------------------------------------------------------
/public/css/images/ui-icons_ef8c08_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/ui-icons_ef8c08_256x240.png
--------------------------------------------------------------------------------
/public/css/images/ui-icons_ffd27a_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/ui-icons_ffd27a_256x240.png
--------------------------------------------------------------------------------
/public/css/images/ui-icons_ffffff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/css/images/ui-icons_ffffff_256x240.png
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/favicon.ico
--------------------------------------------------------------------------------
/public/fonts/Lato-Hairline.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/fonts/Lato-Hairline.woff
--------------------------------------------------------------------------------
/public/fonts/Lato-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/fonts/Lato-Regular.woff
--------------------------------------------------------------------------------
/public/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/public/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/public/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/public/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/public/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/public/images/404/404.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/images/404/404.png
--------------------------------------------------------------------------------
/public/images/404/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/images/404/bg.png
--------------------------------------------------------------------------------
/public/images/404/bg1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/images/404/bg1.png
--------------------------------------------------------------------------------
/public/images/db_vectormode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/images/db_vectormode.png
--------------------------------------------------------------------------------
/public/images/sort_asc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/images/sort_asc.png
--------------------------------------------------------------------------------
/public/images/sort_asc_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/images/sort_asc_disabled.png
--------------------------------------------------------------------------------
/public/images/sort_both.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/images/sort_both.png
--------------------------------------------------------------------------------
/public/images/sort_desc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/images/sort_desc.png
--------------------------------------------------------------------------------
/public/images/sort_desc_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/images/sort_desc_disabled.png
--------------------------------------------------------------------------------
/public/images/vectormode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vectormode/VectorMode/e8efeb848b1aa59706730e69882847aff9d5afc3/public/images/vectormode.png
--------------------------------------------------------------------------------
/public/index.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 |
10 | /*
11 | |--------------------------------------------------------------------------
12 | | Register The Auto Loader
13 | |--------------------------------------------------------------------------
14 | |
15 | | Composer provides a convenient, automatically generated class loader for
16 | | our application. We just need to utilize it! We'll simply require it
17 | | into the script here so that we don't have to worry about manual
18 | | loading any of our classes later on. It feels nice to relax.
19 | |
20 | */
21 |
22 | require __DIR__.'/../bootstrap/autoload.php';
23 |
24 | /*
25 | |--------------------------------------------------------------------------
26 | | Turn On The Lights
27 | |--------------------------------------------------------------------------
28 | |
29 | | We need to illuminate PHP development, so let us turn on the lights.
30 | | This bootstraps the framework and gets it ready for use, then it
31 | | will load up this application so that we can run it and send
32 | | the responses back to the browser and delight our users.
33 | |
34 | */
35 |
36 | $app = require_once __DIR__.'/../bootstrap/app.php';
37 |
38 | /*
39 | |--------------------------------------------------------------------------
40 | | Run The Application
41 | |--------------------------------------------------------------------------
42 | |
43 | | Once we have the application, we can handle the incoming request
44 | | through the kernel, and send the associated response back to
45 | | the client's browser allowing them to enjoy the creative
46 | | and wonderful application we have prepared for them.
47 | |
48 | */
49 |
50 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
51 |
52 | $response = $kernel->handle(
53 | $request = Illuminate\Http\Request::capture()
54 | );
55 |
56 | $response->send();
57 |
58 | $kernel->terminate($request, $response);
59 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | # VectorMode®
6 |
7 | [](https://travis-ci.org/rnaby/VectorMode)
8 |
9 | ## [Localhost](https://github.com/rnaby/VectorMode) | [Server Host](https://github.com/rnaby/VectorMode)
10 |
11 | Right now I'll suggest you to host this application on your localhost. In future I'll release a web host version. This application will also run smoothly on server, but it is not recommended. For any support or assistance please email me naby88@gmail.com.
12 |
13 | ## Description
14 | It is a point of sale (POS) software. With this piece of software you can manage your product sales data easily. I've written this for one of my friends business. I've planned this software as a big system and made it modular. So in future if anyone wants to add more functionality to this system he/she can easily do it.
15 |
16 | ### Modules
17 | * Customer Module
18 | * Order Module
19 | * Product Module
20 | * Refund Module
21 | * Stock Module
22 | * Store Module
23 | * Supplier Module
24 | * User Module
25 |
26 | ## Database Design
27 |
28 | ## Installation
29 | Composer must be installed in your system for installing this software.
30 | ### 1. Step One
31 | Clone this repository to your localhost or server directory.
32 |
35 |
36 | ### 2. Step Two
37 | Now rename the .env.example to .env and fill that file with necessary information.
38 |
39 | ### 3. Step Three
40 | Now go to this software root directory. After going there run
$ composer install
and wait some time while the composer download and install needed packages.
41 |
42 | ### 4. Step Four
43 | Now run $ php artisan migrate for migrating the database
44 |
45 | ### 5. Final Step
46 | Now go to your favourite browser and try to access the software through that browser.
47 |
48 | ## Requirements
49 | * PHP >= 5.5.9
50 | * OpenSSL PHP Extension
51 | * PDO PHP Extension
52 | * Mbstring PHP Extension
53 | * Tokenizer PHP Extension
54 | * MySQL / Sqlite3
55 | * Apache/NGINX
56 | * MySQL
57 | * GD Extension
58 |
59 | ## Built With
60 | * Laravel Framework
61 | * Vue.js
62 | * [dataTable](https://datatables.net/)
63 | * [iCheck](http://icheck.fronteed.com/)
64 | * Database as MySQL or SqLite
65 | * Sweetalert Library
66 | * Twitter Bootstrap Frontend Framework
67 | * [gentelella](https://github.com/puikinsh/gentelella) Admin Template
68 | * [domPDF](https://dompdf.github.io/)
69 |
70 | ## Features
71 | * Built using Laravel 5.2
72 | * Live PDF generation using [domPDF](https://dompdf.github.io/)
73 | * Recurring invoices with auto-billing
74 | * Manage multiple store
75 | * Inventory management
76 | * Daily, weekly and monthly report generation
77 | * Multi-user support
78 | * Tax rates and payment terms
79 | * Discount management
80 | * Partial payments
81 | * Due management
82 | * Supplier management
83 | * Auto DB backup(Right now for Sqlite only)
84 |
85 | ## Queries
86 | For any further query on **VectorMode®**, please create an issue. We will discuss the topic there. I'll not answer any email on query. Email communication is only for **Contribution**, **Donation** and **Documentation.**
87 |
88 | ## Contributing
89 | All contributors are welcome!
90 | For information on how contribute to **VectorMode®**, please contact me at naby88@gmail.com.
91 |
92 | ## Donation
93 | Any kinds of donations are welcome!
94 | For information on how donate to **VectorMode®**, please contact me at naby88@gmail.com.
95 |
96 | ## Documentation
97 | It is one of my pet projects. After 9-5 regular job I coded it at home. You can understand that it wasn't possible for me till now to write the software and documentation both at a time. So it would be great if you guys contribute to this software documentation as well as to this software code.
98 | For information on writing the documentation of **VectorMode®**, please contact me at naby88@gmail.com.
99 |
100 | ## License
101 | **VectorMode®** is released under the Attribution Assurance License.
102 | See [LICENSE](LICENSE) for details.
103 |
--------------------------------------------------------------------------------
/resources/lang/en/auth.php:
--------------------------------------------------------------------------------
1 | 'These credentials do not match our records.',
17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/resources/lang/en/pagination.php:
--------------------------------------------------------------------------------
1 | '« Previous',
17 | 'next' => 'Next »',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/resources/lang/en/passwords.php:
--------------------------------------------------------------------------------
1 | 'Passwords must be at least six characters and match the confirmation.',
17 | 'reset' => 'Your password has been reset!',
18 | 'sent' => 'We have e-mailed your password reset link!',
19 | 'token' => 'This password reset token is invalid.',
20 | 'user' => "We can't find a user with that e-mail address.",
21 |
22 | ];
23 |
--------------------------------------------------------------------------------
/resources/lang/en/validation.php:
--------------------------------------------------------------------------------
1 | 'The :attribute must be accepted.',
17 | 'active_url' => 'The :attribute is not a valid URL.',
18 | 'after' => 'The :attribute must be a date after :date.',
19 | 'alpha' => 'The :attribute may only contain letters.',
20 | 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
21 | 'alpha_num' => 'The :attribute may only contain letters and numbers.',
22 | 'array' => 'The :attribute must be an array.',
23 | 'before' => 'The :attribute must be a date before :date.',
24 | 'between' => [
25 | 'numeric' => 'The :attribute must be between :min and :max.',
26 | 'file' => 'The :attribute must be between :min and :max kilobytes.',
27 | 'string' => 'The :attribute must be between :min and :max characters.',
28 | 'array' => 'The :attribute must have between :min and :max items.',
29 | ],
30 | 'boolean' => 'The :attribute field must be true or false.',
31 | 'confirmed' => 'The :attribute confirmation does not match.',
32 | 'date' => 'The :attribute is not a valid date.',
33 | 'date_format' => 'The :attribute does not match the format :format.',
34 | 'different' => 'The :attribute and :other must be different.',
35 | 'digits' => 'The :attribute must be :digits digits.',
36 | 'digits_between' => 'The :attribute must be between :min and :max digits.',
37 | 'distinct' => 'The :attribute field has a duplicate value.',
38 | 'email' => 'The :attribute must be a valid email address.',
39 | 'exists' => 'The selected :attribute is invalid.',
40 | 'filled' => 'The :attribute field is required.',
41 | 'image' => 'The :attribute must be an image.',
42 | 'in' => 'The selected :attribute is invalid.',
43 | 'in_array' => 'The :attribute field does not exist in :other.',
44 | 'integer' => 'The :attribute must be an integer.',
45 | 'ip' => 'The :attribute must be a valid IP address.',
46 | 'json' => 'The :attribute must be a valid JSON string.',
47 | 'max' => [
48 | 'numeric' => 'The :attribute may not be greater than :max.',
49 | 'file' => 'The :attribute may not be greater than :max kilobytes.',
50 | 'string' => 'The :attribute may not be greater than :max characters.',
51 | 'array' => 'The :attribute may not have more than :max items.',
52 | ],
53 | 'mimes' => 'The :attribute must be a file of type: :values.',
54 | 'min' => [
55 | 'numeric' => 'The :attribute must be at least :min.',
56 | 'file' => 'The :attribute must be at least :min kilobytes.',
57 | 'string' => 'The :attribute must be at least :min characters.',
58 | 'array' => 'The :attribute must have at least :min items.',
59 | ],
60 | 'not_in' => 'The selected :attribute is invalid.',
61 | 'numeric' => 'The :attribute must be a number.',
62 | 'present' => 'The :attribute field must be present.',
63 | 'regex' => 'The :attribute format is invalid.',
64 | 'required' => 'The :attribute field is required.',
65 | 'required_if' => 'The :attribute field is required when :other is :value.',
66 | 'required_unless' => 'The :attribute field is required unless :other is in :values.',
67 | 'required_with' => 'The :attribute field is required when :values is present.',
68 | 'required_with_all' => 'The :attribute field is required when :values is present.',
69 | 'required_without' => 'The :attribute field is required when :values is not present.',
70 | 'required_without_all' => 'The :attribute field is required when none of :values are present.',
71 | 'same' => 'The :attribute and :other must match.',
72 | 'size' => [
73 | 'numeric' => 'The :attribute must be :size.',
74 | 'file' => 'The :attribute must be :size kilobytes.',
75 | 'string' => 'The :attribute must be :size characters.',
76 | 'array' => 'The :attribute must contain :size items.',
77 | ],
78 | 'string' => 'The :attribute must be a string.',
79 | 'timezone' => 'The :attribute must be a valid zone.',
80 | 'unique' => 'The :attribute has already been taken.',
81 | 'url' => 'The :attribute format is invalid.',
82 |
83 | /*
84 | |--------------------------------------------------------------------------
85 | | Custom Validation Language Lines
86 | |--------------------------------------------------------------------------
87 | |
88 | | Here you may specify custom validation messages for attributes using the
89 | | convention "attribute.rule" to name the lines. This makes it quick to
90 | | specify a specific custom language line for a given attribute rule.
91 | |
92 | */
93 |
94 | 'custom' => [
95 | 'attribute-name' => [
96 | 'rule-name' => 'custom-message',
97 | ],
98 | ],
99 |
100 | /*
101 | |--------------------------------------------------------------------------
102 | | Custom Validation Attributes
103 | |--------------------------------------------------------------------------
104 | |
105 | | The following language lines are used to swap attribute place-holders
106 | | with something more reader friendly such as E-Mail Address instead
107 | | of "email". This simply helps us make messages a little cleaner.
108 | |
109 | */
110 |
111 | 'attributes' => [],
112 |
113 | ];
114 |
--------------------------------------------------------------------------------
/resources/views/auth/login.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | VectorMode
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
23 |
24 |
25 |
29 |
30 |
31 |
32 |
33 |
34 |