├── .editorconfig ├── .env ├── .env.example ├── .github └── FUNDING.yml ├── .styleci.yml ├── README.md ├── app ├── Cart.php ├── Category.php ├── Client.php ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Exports │ └── SalesExport.php ├── Http │ ├── Controllers │ │ ├── Auth │ │ │ ├── ConfirmPasswordController.php │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ ├── ResetPasswordController.php │ │ │ └── VerificationController.php │ │ ├── CartController.php │ │ ├── CategoryController.php │ │ ├── ClientController.php │ │ ├── Controller.php │ │ ├── DataController.php │ │ ├── HomeController.php │ │ ├── OfficeController.php │ │ ├── ProductController.php │ │ ├── SaleController.php │ │ └── UserController.php │ ├── Kernel.php │ ├── Middleware │ │ ├── Authenticate.php │ │ ├── CheckForMaintenanceMode.php │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustProxies.php │ │ └── VerifyCsrfToken.php │ └── Requests │ │ ├── CategoryRequest.php │ │ ├── ClientRequest.php │ │ ├── ProductRequest.php │ │ └── SaleRequest.php ├── Product.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Sale.php └── User.php ├── artisan ├── baca.txt ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cors.php ├── database.php ├── excel.php ├── filesystems.php ├── hashing.php ├── logging.php ├── mail.php ├── queue.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ ├── CategoryFactory.php │ └── ProductFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ ├── 2020_04_13_160458_create_clients_table.php │ ├── 2020_04_13_160512_create_categories_table.php │ ├── 2020_04_13_160525_create_sales_table.php │ ├── 2020_04_13_160541_create_products_table.php │ └── 2020_04_13_160554_create_carts_table.php └── seeds │ └── DatabaseSeeder.php ├── img ├── Screenshot_2020-05-27 INVOICE ONLINE(1).png ├── Screenshot_2020-05-27 INVOICE ONLINE(2).png ├── Screenshot_2020-05-27 INVOICE ONLINE(3).png ├── Screenshot_2020-05-27 INVOICE ONLINE(4).png ├── Screenshot_2020-05-27 INVOICE ONLINE(5).png ├── Screenshot_2020-05-27 INVOICE ONLINE(6).png ├── Screenshot_2020-05-27 INVOICE ONLINE(7).png ├── Screenshot_2020-05-27 INVOICE ONLINE.png ├── Screenshot_2020-05-27 POS(1).png ├── Screenshot_2020-05-27 Z POS Web Apps(1).png ├── Screenshot_2020-05-27 Z POS Web Apps.png ├── Screenshotsa_2020-05-27 INVOICE ONLINE.png ├── update1.jpg ├── update2.jpg └── update3.png ├── index.php ├── package-lock.json ├── package.json ├── phpunit.xml ├── pos ├── aplikasikasir.min.css ├── mesinkasir.css └── restoapp.css ├── public ├── .htaccess ├── css │ └── app.css ├── favicon.ico ├── img │ ├── aplikasi kasir invoice online zinvoice.jpg │ ├── app toko kasir invoice online.jpg │ ├── kasir invoice online web app.jpg │ ├── laravel.svg │ └── mesin kasir online zinvoice.jpg ├── index.php ├── js │ ├── app.js │ ├── app.js.LICENSE.txt │ ├── bos.js │ ├── lara.js │ └── report.js ├── mix-manifest.json └── robots.txt ├── resources ├── js │ ├── app.js │ ├── bootstrap.js │ └── sales.js ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php ├── pos │ ├── aplikasikasir.js │ ├── aplikasikasir.min.css │ ├── aplikasikasir.scss │ ├── aplikasirestoran.js │ ├── mesinkasir.css │ └── restoapp.css ├── sass │ ├── _variables.scss │ └── app.scss └── views │ ├── auth │ ├── login.blade.php │ ├── passwords │ │ ├── admin.blade.php │ │ ├── confirm.blade.php │ │ ├── email.blade.php │ │ ├── pos.blade.php │ │ ├── reset.blade.php │ │ └── transaction.blade.php │ ├── pos.blade.php │ ├── register.blade.php │ └── verify.blade.php │ ├── categories │ ├── create.blade.php │ └── index.blade.php │ ├── clients │ ├── create.blade.php │ ├── edit.blade.php │ └── index.blade.php │ ├── data.blade.php │ ├── home.blade.php │ ├── index.blade.php │ ├── layouts │ └── app.blade.php │ ├── office.blade.php │ ├── products │ ├── create.blade.php │ ├── edit.blade.php │ └── index.blade.php │ ├── sales │ ├── create.blade.php │ ├── index.blade.php │ └── single.blade.php │ ├── users │ └── index.blade.php │ └── welcome.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php ├── webpack.mix.js ├── zinvoice - emptydb.sql └── zinvoice.sql /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | APP_NAME=mesinkasironline.web.app 2 | APP_ENV=local 3 | APP_KEY=base64:moEzy8y53k4rX1UIyfwcgaD7t/DKukLFx3536vb37ZI= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | 9 | DB_CONNECTION=mysql 10 | DB_HOST=127.0.0.1 11 | DB_PORT=3306 12 | DB_DATABASE=lapos 13 | DB_USERNAME=root 14 | DB_PASSWORD= 15 | 16 | BROADCAST_DRIVER=log 17 | CACHE_DRIVER=file 18 | QUEUE_CONNECTION=sync 19 | SESSION_DRIVER=file 20 | SESSION_LIFETIME=120 21 | 22 | REDIS_HOST=127.0.0.1 23 | REDIS_PASSWORD=null 24 | REDIS_PORT=6379 25 | 26 | MAIL_DRIVER=smtp 27 | MAIL_HOST=smtp.mailtrap.io 28 | MAIL_PORT=2525 29 | MAIL_USERNAME=null 30 | MAIL_PASSWORD=null 31 | MAIL_ENCRYPTION=null 32 | MAIL_FROM_ADDRESS=null 33 | MAIL_FROM_NAME="${APP_NAME}" 34 | 35 | AWS_ACCESS_KEY_ID= 36 | AWS_SECRET_ACCESS_KEY= 37 | AWS_DEFAULT_REGION=us-east-1 38 | AWS_BUCKET= 39 | 40 | PUSHER_APP_ID= 41 | PUSHER_APP_KEY= 42 | PUSHER_APP_SECRET= 43 | PUSHER_APP_CLUSTER=mt1 44 | 45 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 46 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 47 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | 9 | DB_CONNECTION=mysql 10 | DB_HOST=127.0.0.1 11 | DB_PORT=3306 12 | DB_DATABASE=laravel 13 | DB_USERNAME=root 14 | DB_PASSWORD= 15 | 16 | BROADCAST_DRIVER=log 17 | CACHE_DRIVER=file 18 | QUEUE_CONNECTION=sync 19 | SESSION_DRIVER=file 20 | SESSION_LIFETIME=120 21 | 22 | REDIS_HOST=127.0.0.1 23 | REDIS_PASSWORD=null 24 | REDIS_PORT=6379 25 | 26 | MAIL_DRIVER=smtp 27 | MAIL_HOST=smtp.mailtrap.io 28 | MAIL_PORT=2525 29 | MAIL_USERNAME=null 30 | MAIL_PASSWORD=null 31 | MAIL_ENCRYPTION=null 32 | MAIL_FROM_ADDRESS=null 33 | MAIL_FROM_NAME="${APP_NAME}" 34 | 35 | AWS_ACCESS_KEY_ID= 36 | AWS_SECRET_ACCESS_KEY= 37 | AWS_DEFAULT_REGION=us-east-1 38 | AWS_BUCKET= 39 | 40 | PUSHER_APP_ID= 41 | PUSHER_APP_KEY= 42 | PUSHER_APP_SECRET= 43 | PUSHER_APP_CLUSTER=mt1 44 | 45 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 46 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 47 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: mesinkasir 2 | custom: ['https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JVZVXBC4N9DAN', 'https://creativitaz.gumroad.com/coffee'] 3 | -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | disabled: 4 | - unused_use 5 | finder: 6 | not-name: 7 | - index.php 8 | - server.php 9 | js: 10 | finder: 11 | not-name: 12 | - webpack.mix.js 13 | css: true 14 | -------------------------------------------------------------------------------- /app/Cart.php: -------------------------------------------------------------------------------- 1 | hasMany('App\Sale', 'sale_id', 'sale_id'); 22 | } 23 | 24 | //This model can have one or many products 25 | public function products() { 26 | return $this->hasMany('App\Product', 'product_id', 'product_id'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Category.php: -------------------------------------------------------------------------------- 1 | hasMany('App\Product'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Client.php: -------------------------------------------------------------------------------- 1 | hasMany('App\Sale', 'sale_id'); 19 | } 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 28 | } 29 | 30 | /** 31 | * Register the commands for the application. 32 | * 33 | * @return void 34 | */ 35 | protected function commands() 36 | { 37 | $this->load(__DIR__.'/Commands'); 38 | 39 | require base_path('routes/console.php'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | first(); 37 | // Retrieve the information with the cart relation inside 38 | return Sale::with('carts')->where('created', $lastSale->created) 39 | ->get(); 40 | } 41 | 42 | //Map the data inside the file 43 | public function map($sale): array 44 | { 45 | //Create the primary rows with the sale information 46 | $rows = [ 47 | [ 48 | $sale->sale_id, 49 | $sale->rfc, 50 | $sale->total, 51 | $sale->created 52 | ], 53 | [ 54 | '', 55 | '' 56 | ], 57 | [ 58 | '', 59 | 'Product', 60 | 'Price', 61 | 'Qty' 62 | ] 63 | ]; 64 | 65 | // Go through the carts and retrieve the product information 66 | foreach ($sale->carts as $cart) { 67 | foreach ($cart->products as $product) { 68 | $rows[] = [ 69 | '', 70 | $product->name, 71 | $product->price, 72 | $cart->amount 73 | ]; 74 | } 75 | } 76 | 77 | // Add a blank space 78 | $rows[] = [ 79 | '', 80 | '', 81 | '', 82 | '' 83 | ]; 84 | 85 | //Add new headers 86 | $rows[] = [ 87 | '# No', 88 | 'Customer', 89 | 'Total', 90 | 'Date', 91 | 92 | ]; 93 | 94 | //Return the data 95 | return $rows; 96 | } 97 | 98 | public function columnFormats(): array 99 | { 100 | return [ 101 | 'C' => NumberFormat::FORMAT_ACCOUNTING_USD 102 | ]; 103 | } 104 | 105 | 106 | } 107 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ConfirmPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('logout'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 42 | } 43 | 44 | /** 45 | * Get a validator for an incoming registration request. 46 | * 47 | * @param array $data 48 | * @return \Illuminate\Contracts\Validation\Validator 49 | */ 50 | protected function validator(array $data) 51 | { 52 | return Validator::make($data, [ 53 | 'name' => ['required', 'string', 'max:255'], 54 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 55 | 'password' => ['required', 'string', 'min:8', 'confirmed'], 56 | ]); 57 | } 58 | 59 | /** 60 | * Create a new user instance after a valid registration. 61 | * 62 | * @param array $data 63 | * @return \App\User 64 | */ 65 | protected function create(array $data) 66 | { 67 | return User::create([ 68 | 'name' => $data['name'], 69 | 'email' => $data['email'], 70 | 'password' => Hash::make($data['password']), 71 | ]); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 39 | $this->middleware('signed')->only('verify'); 40 | $this->middleware('throttle:6,1')->only('verify', 'resend'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Http/Controllers/CartController.php: -------------------------------------------------------------------------------- 1 | paginate(); 17 | return view('categories.index', compact('categories')); 18 | } 19 | 20 | /** 21 | * Show the form for creating a new resource. 22 | * 23 | * @return \Illuminate\Http\Response 24 | */ 25 | public function create() 26 | { 27 | return view('categories.create'); 28 | } 29 | 30 | /** 31 | * Store a newly created resource in storage. 32 | * 33 | * @param \Illuminate\Http\Request $request 34 | * @return \Illuminate\Http\RedirectResponse 35 | */ 36 | public function store(CategoryRequest $request) 37 | { 38 | Category::create($request->all()); 39 | return back()->with('created', true); 40 | } 41 | 42 | 43 | /* 44 | * Remove the specified resource from storage. 45 | * 46 | * @param \App\Category $category 47 | * @return \Illuminate\Http\Response 48 | */ 49 | public function destroy(Category $category) 50 | { 51 | $category->delete(); 52 | return back()->with('deleted', true); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/Http/Controllers/ClientController.php: -------------------------------------------------------------------------------- 1 | get(); 17 | return view('clients.index', compact('clients')); 18 | } 19 | 20 | /* 21 | * Show the form for creating a new resource. 22 | */ 23 | public function create() 24 | { 25 | return view('clients.create'); 26 | } 27 | 28 | /* 29 | * Store a newly created resource in storage. 30 | */ 31 | public function store(ClientRequest $request) 32 | { 33 | 34 | Client::create($request->all()); 35 | 36 | return back()->with('created', true); 37 | } 38 | 39 | /** 40 | * Display the specified resource. 41 | * 42 | * @param \App\Client $client 43 | * @return \Illuminate\Http\Response 44 | */ 45 | public function show(Client $client) 46 | { 47 | // 48 | } 49 | 50 | /** 51 | * Show the form for editing the specified resource. 52 | * 53 | * @param \App\Client $client 54 | * @return \Illuminate\Http\Response 55 | */ 56 | public function edit(Client $client) 57 | { 58 | return view('clients.edit', compact('client')); 59 | } 60 | 61 | /* 62 | * Update the specified resource in storage. 63 | * 64 | * @param \Illuminate\Http\Request $request 65 | * @param \App\Client $client 66 | * @return \Illuminate\Http\Response 67 | */ 68 | public function update(ClientRequest $request, Client $client) 69 | { 70 | $client->update($request->all()); 71 | 72 | return redirect()->route('clients.index')->with('updated', true); 73 | } 74 | 75 | /* 76 | * Remove the specified resource from storage. 77 | */ 78 | public function destroy(Client $client) 79 | { 80 | $client->delete(); 81 | return back()->with('deleted', true); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 17 | } 18 | 19 | /** 20 | * Show the application dashboard. 21 | * 22 | * @return \Illuminate\Contracts\Support\Renderable 23 | */ 24 | public function index() 25 | { 26 | return view('data'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Controllers/HomeController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 17 | } 18 | 19 | /** 20 | * Show the application dashboard. 21 | * 22 | * @return \Illuminate\Contracts\Support\Renderable 23 | */ 24 | public function index() 25 | { 26 | return view('home'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Controllers/OfficeController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 17 | } 18 | 19 | /** 20 | * Show the application dashboard. 21 | * 22 | * @return \Illuminate\Contracts\Support\Renderable 23 | */ 24 | public function index() 25 | { 26 | return view('office'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Controllers/ProductController.php: -------------------------------------------------------------------------------- 1 | paginate(6); 18 | 19 | return view('products.index', [ 20 | 'products' => $products 21 | ]); 22 | } 23 | 24 | /** 25 | * Show the form for creating a new resource. 26 | */ 27 | public function create() 28 | { 29 | $categories = Category::all(); 30 | return view('products.create', compact('categories')); 31 | } 32 | 33 | /* 34 | * Store a newly created resource in storage. 35 | */ 36 | public function store(ProductRequest $request) 37 | { 38 | //Store the product 39 | Product::create($request->all()); 40 | return back()->with('created', true); 41 | } 42 | 43 | /** 44 | * Display the specified resource. 45 | * 46 | * @param \App\Product $product 47 | * @return \Illuminate\Http\Response 48 | */ 49 | public function show(Product $product) 50 | { 51 | // 52 | } 53 | 54 | /** 55 | * Show the form for editing the specified resource. 56 | * 57 | * @param \App\Product $product 58 | * @return \Illuminate\Http\Response 59 | */ 60 | public function edit(Product $product) 61 | { 62 | $categories = Category::all(); 63 | return view('products.edit', compact('product', 'categories')); 64 | } 65 | 66 | /* 67 | * Update the specified resource in storage. 68 | */ 69 | public function update(ProductRequest $request, Product $product) 70 | { 71 | $product->update($request->all()); 72 | 73 | return back()->with('updated', true); 74 | } 75 | 76 | /** 77 | * Remove the specified resource from storage. 78 | */ 79 | public function destroy(Product $product) 80 | { 81 | $product->delete(); 82 | return back()->with('error', false); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /app/Http/Controllers/SaleController.php: -------------------------------------------------------------------------------- 1 | paginate(); 22 | return view('sales.index', compact('sales')); 23 | } 24 | 25 | /* 26 | * Show the form for creating a new resource. 27 | * 28 | * @return \Illuminate\Http\Response 29 | */ 30 | public function create() 31 | { 32 | //Get the clients information 33 | $clients = Client::orderBy('rfc', 'DESC')->get(); 34 | //Get the products information 35 | $products = Product::orderBy('name', 'DESC')->get(); 36 | //Total of sales today 37 | $totalSalesPerDay = 0; 38 | $salesToday = Sale::select('total')->where('created', date('Y-m-d')) 39 | ->get(); 40 | 41 | foreach ($salesToday as $sale) { 42 | $totalSalesPerDay += $sale->total; 43 | } 44 | 45 | return view( 46 | 'sales.create', 47 | compact('clients', 'products', 'totalSalesPerDay') 48 | ); 49 | } 50 | 51 | /* 52 | * Store a newly created resource in storage. 53 | */ 54 | public function store(SaleRequest $request) 55 | { 56 | $sale = Sale::create( 57 | [ 58 | 'total' => $request->input('total'), 59 | 'rfc' => $request->input('rfc'), 60 | 'id' => $request->input('id'), 61 | 'created' => date('Y-m-d') 62 | ] 63 | ); 64 | 65 | if (isset($sale)) { 66 | $productsArray = (array)json_decode($request->input('products')); 67 | $completed = []; 68 | //Get the products sales 69 | foreach ($productsArray as $index) { 70 | $cart = new Cart(); 71 | $cart->sale_id = $sale->sale_id; 72 | $cart->product_id = $index->id; 73 | $cart->amount = $index->amount; 74 | $cart->created = date('Y-m-d'); 75 | $cart->save(); 76 | $completed[] = $cart; 77 | } 78 | 79 | if (count($productsArray) === count($completed)) { 80 | return new Response($completed, 201); 81 | } 82 | } 83 | return new Response('Cart was not filled', 500); 84 | } 85 | 86 | /* 87 | * Display the specified resource. 88 | */ 89 | public function show(Sale $sale) 90 | { 91 | //Cart information 92 | $carts = Cart::where('sale_id', $sale->sale_id)->get(); 93 | 94 | return view('sales.single', compact('sale', 'carts')); 95 | } 96 | 97 | /* 98 | * Returns a response with the file provided by SalesExport 99 | * */ 100 | public function export() 101 | { 102 | if (Sale::all()->count() > 0) { 103 | return Excel::download(new SalesExport(), 'sales.xlsx'); 104 | } 105 | return back(); 106 | } 107 | 108 | /* 109 | * Remove the specified resource from storage. 110 | */ 111 | public function destroy(Sale $sale) 112 | { 113 | try { 114 | $sale->delete(); 115 | } catch (\Exception $e) { 116 | return back()->with('error', 'Error'); 117 | } 118 | return back()->with('deleted', true); 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /app/Http/Controllers/UserController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 14 | } 15 | 16 | /* 17 | * Display a listing of the resource. 18 | * 19 | * @return \Illuminate\Http\Response 20 | */ 21 | public function index() 22 | { 23 | $users = User::all(); 24 | return view('users.index', compact('users')); 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 | // 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(Request $request) 44 | { 45 | // 46 | } 47 | 48 | /** 49 | * Display the specified resource. 50 | * 51 | * @param \App\User $user 52 | * @return \Illuminate\Http\Response 53 | */ 54 | public function show(User $user) 55 | { 56 | // 57 | } 58 | 59 | /** 60 | * Show the form for editing the specified resource. 61 | * 62 | * @param \App\User $user 63 | * @return \Illuminate\Http\Response 64 | */ 65 | public function edit(User $user) 66 | { 67 | // 68 | } 69 | 70 | /** 71 | * Update the specified resource in storage. 72 | * 73 | * @param \Illuminate\Http\Request $request 74 | * @param \App\User $user 75 | * @return \Illuminate\Http\Response 76 | */ 77 | public function update(Request $request, User $user) 78 | { 79 | // 80 | } 81 | 82 | /* 83 | * Remove the specified resource from storage. 84 | * 85 | * @param \App\User $user 86 | * @return \Illuminate\Http\Response 87 | */ 88 | public function destroy(User $user) 89 | { 90 | $user->delete(); 91 | return redirect()->route('users.index'); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 32 | \App\Http\Middleware\EncryptCookies::class, 33 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 34 | \Illuminate\Session\Middleware\StartSession::class, 35 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 36 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 37 | \App\Http\Middleware\VerifyCsrfToken::class, 38 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 39 | ], 40 | 41 | 'api' => [ 42 | 'throttle:60,1', 43 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 44 | ], 45 | ]; 46 | 47 | /** 48 | * The application's route middleware. 49 | * 50 | * These middleware may be assigned to groups or used individually. 51 | * 52 | * @var array 53 | */ 54 | protected $routeMiddleware = [ 55 | 'auth' => \App\Http\Middleware\Authenticate::class, 56 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 57 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 58 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 59 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 60 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 61 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 62 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 63 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 64 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 65 | ]; 66 | } 67 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/CheckForMaintenanceMode.php: -------------------------------------------------------------------------------- 1 | check()) { 22 | return redirect(RouteServiceProvider::HOME); 23 | } 24 | 25 | return $next($request); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 'required' 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/ClientRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'string'], 28 | 'name' => ['required', 'string'], 29 | 'email' => ['nullable', 'email:rfc,dns'], 30 | 'phone' => ['nullable', 'numeric'], 31 | 'address' => ['nullable', 'string'] 32 | ]; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Http/Requests/ProductRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'string'], 28 | 'description' => ['string', 'nullable'], 29 | 'product_left' => ['numeric', 'nullable'], 30 | 'price' => ['required', 'numeric'], 31 | 'cost' => ['numeric', 'nullable'], 32 | 'category_id' => ['required', 'integer'] 33 | ]; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Http/Requests/SaleRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'string'], 28 | 'products' => ['required', 'json'], 29 | 'total' => ['required', 'numeric', 'min:1'] 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Product.php: -------------------------------------------------------------------------------- 1 | belongsToMany('App\Cart', 'carts', 'sale_id'); 18 | } 19 | 20 | public function getGetExtractAttribute() { 21 | return substr($this->description, 0, 50); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | * 26 | * @return void 27 | */ 28 | public function boot() 29 | { 30 | parent::boot(); 31 | 32 | // 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapApiRoutes(); 46 | 47 | $this->mapWebRoutes(); 48 | 49 | // 50 | } 51 | 52 | /** 53 | * Define the "web" routes for the application. 54 | * 55 | * These routes all receive session state, CSRF protection, etc. 56 | * 57 | * @return void 58 | */ 59 | protected function mapWebRoutes() 60 | { 61 | Route::middleware('web') 62 | ->namespace($this->namespace) 63 | ->group(base_path('routes/web.php')); 64 | } 65 | 66 | /** 67 | * Define the "api" routes for the application. 68 | * 69 | * These routes are typically stateless. 70 | * 71 | * @return void 72 | */ 73 | protected function mapApiRoutes() 74 | { 75 | Route::prefix('api') 76 | ->middleware('api') 77 | ->namespace($this->namespace) 78 | ->group(base_path('routes/api.php')); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /app/Sale.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Client', 'rfc'); 23 | } 24 | 25 | // This model can exists in N carts 26 | public function carts() { 27 | return $this->belongsToMany('App\Cart', 'sales', 'sale_id', 28 | 'sale_id', 'sale_id', 'sale_id') 29 | ; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/User.php: -------------------------------------------------------------------------------- 1 | 'datetime', 38 | ]; 39 | 40 | //This model can attend 1 or N sales 41 | public function sales() { 42 | return $this->hasMany('App\Sale'); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /baca.txt: -------------------------------------------------------------------------------- 1 | DOWNLOAD LARAVEL INVOICE POS 2 | 3 | For first we on your terminal need third party installation 4 | + xampp 5 | https://www.apachefriends.org/download.html 6 | 7 | + composer 8 | https://getcomposer.org/download/ 9 | 10 | +git bash 11 | https://git-scm.com/downloads 12 | 13 | Run all third party apps, and run xampp 14 | 15 | open on localhost/phpmyadmin 16 | and create new databased mysql, name it with lapos 17 | 18 | 19 | now download laravel invoice pos 20 | 21 | prorgress installation and download 22 | 1. sourceforge 23 | 2. github 24 | 25 | from sourceforge 26 | download from sourceforge 27 | 28 | 29 | open and extract zip download folder to your project folder 30 | 31 | now back to localhost/phpmyadmin select your database lapos 32 | and click import - import databased zinvoice.sql if you need database with demo 33 | or zinvoice - empytdb.sql if you need empty databased. 34 | after import database now you can back to project folder, 35 | right click and select git bash here. run comand 36 | composer install && php artisan key:generate && php artisan serve 37 | 38 | 39 | from github clone / fork 40 | 41 | open project folder and right click - select git bash here 42 | and run : 43 | composer install && php artisan migrate && php artisan db:seed && php artisan key:generate && php artisan serve 44 | 45 | 46 | Get Started : 47 | visit localhost:8000 on web browser. 48 | now you can view a laravel point of sale with invoice system web apps , just click on get started button and login to apps. 49 | 50 | by default login 51 | email : admin@admin.com 52 | pass : 12345678 53 | 54 | Features : 55 | User databased for create update and delete user CRUD 56 | Customer databased can create update and delete customer CRUD 57 | Categories product for grouping your product with features create update and delete catgeories CRUD 58 | Product for create and register your product with features create update and delete product CRUD 59 | POS kios : for using cashier transaction on point of sale display. 60 | You can print out receipt print or invoice print format. 61 | Report for see all report detailed, and export report to see all transaction in one day. 62 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": [ 6 | "framework", 7 | "laravel" 8 | ], 9 | "license": "MIT", 10 | "require": { 11 | "php": "^7.2.5", 12 | "fideloper/proxy": "^4.2", 13 | "fruitcake/laravel-cors": "^1.0", 14 | "guzzlehttp/guzzle": "^6.3", 15 | "laravel/framework": "^7.0", 16 | "laravel/tinker": "^2.0", 17 | "maatwebsite/excel": "^3.1" 18 | }, 19 | "require-dev": { 20 | "facade/ignition": "^2.0", 21 | "fzaninotto/faker": "^1.9.1", 22 | "laravel/ui": "^2.0", 23 | "mockery/mockery": "^1.3.1", 24 | "nunomaduro/collision": "^4.1", 25 | "phpunit/phpunit": "^8.5" 26 | }, 27 | "config": { 28 | "optimize-autoloader": true, 29 | "preferred-install": "dist", 30 | "sort-packages": true 31 | }, 32 | "extra": { 33 | "laravel": { 34 | "dont-discover": [] 35 | } 36 | }, 37 | "autoload": { 38 | "psr-4": { 39 | "App\\": "app/" 40 | }, 41 | "classmap": [ 42 | "database/seeds", 43 | "database/factories" 44 | ] 45 | }, 46 | "autoload-dev": { 47 | "psr-4": { 48 | "Tests\\": "tests/" 49 | } 50 | }, 51 | "minimum-stability": "dev", 52 | "prefer-stable": true, 53 | "scripts": { 54 | "post-autoload-dump": [ 55 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 56 | "@php artisan package:discover --ansi" 57 | ], 58 | "post-root-package-install": [ 59 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 60 | ], 61 | "post-create-project-cmd": [ 62 | "@php artisan key:generate --ansi" 63 | ] 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session", "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 | 'hash' => false, 48 | ], 49 | ], 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | User Providers 54 | |-------------------------------------------------------------------------- 55 | | 56 | | All authentication drivers have a user provider. This defines how the 57 | | users are actually retrieved out of your database or other storage 58 | | mechanisms used by this application to persist your user's data. 59 | | 60 | | If you have multiple user tables or models you may configure multiple 61 | | sources which represent each model / table. These sources may then 62 | | be assigned to any extra authentication guards you have defined. 63 | | 64 | | Supported: "database", "eloquent" 65 | | 66 | */ 67 | 68 | 'providers' => [ 69 | 'users' => [ 70 | 'driver' => 'eloquent', 71 | 'model' => App\User::class, 72 | ], 73 | 74 | // 'users' => [ 75 | // 'driver' => 'database', 76 | // 'table' => 'users', 77 | // ], 78 | ], 79 | 80 | /* 81 | |-------------------------------------------------------------------------- 82 | | Resetting Passwords 83 | |-------------------------------------------------------------------------- 84 | | 85 | | You may specify multiple password reset configurations if you have more 86 | | than one user table or model in the application and you want to have 87 | | separate password reset settings based on the specific user types. 88 | | 89 | | The expire time is the number of minutes that the reset token should be 90 | | considered valid. This security feature keeps tokens short-lived so 91 | | they have less time to be guessed. You may change this as needed. 92 | | 93 | */ 94 | 95 | 'passwords' => [ 96 | 'users' => [ 97 | 'provider' => 'users', 98 | 'table' => 'password_resets', 99 | 'expire' => 60, 100 | 'throttle' => 60, 101 | ], 102 | ], 103 | 104 | /* 105 | |-------------------------------------------------------------------------- 106 | | Password Confirmation Timeout 107 | |-------------------------------------------------------------------------- 108 | | 109 | | Here you may define the amount of seconds before a password confirmation 110 | | times out and the user is prompted to re-enter their password via the 111 | | confirmation screen. By default, the timeout lasts for three hours. 112 | | 113 | */ 114 | 115 | 'password_timeout' => 10800, 116 | 117 | ]; 118 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'useTLS' => true, 41 | ], 42 | ], 43 | 44 | 'redis' => [ 45 | 'driver' => 'redis', 46 | 'connection' => 'default', 47 | ], 48 | 49 | 'log' => [ 50 | 'driver' => 'log', 51 | ], 52 | 53 | 'null' => [ 54 | 'driver' => 'null', 55 | ], 56 | 57 | ], 58 | 59 | ]; 60 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Cache Stores 26 | |-------------------------------------------------------------------------- 27 | | 28 | | Here you may define all of the cache "stores" for your application as 29 | | well as their drivers. You may even define multiple stores for the 30 | | same cache driver to group types of items stored in your caches. 31 | | 32 | */ 33 | 34 | 'stores' => [ 35 | 36 | 'apc' => [ 37 | 'driver' => 'apc', 38 | ], 39 | 40 | 'array' => [ 41 | 'driver' => 'array', 42 | 'serialize' => false, 43 | ], 44 | 45 | 'database' => [ 46 | 'driver' => 'database', 47 | 'table' => 'cache', 48 | 'connection' => null, 49 | ], 50 | 51 | 'file' => [ 52 | 'driver' => 'file', 53 | 'path' => storage_path('framework/cache/data'), 54 | ], 55 | 56 | 'memcached' => [ 57 | 'driver' => 'memcached', 58 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 59 | 'sasl' => [ 60 | env('MEMCACHED_USERNAME'), 61 | env('MEMCACHED_PASSWORD'), 62 | ], 63 | 'options' => [ 64 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 65 | ], 66 | 'servers' => [ 67 | [ 68 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 69 | 'port' => env('MEMCACHED_PORT', 11211), 70 | 'weight' => 100, 71 | ], 72 | ], 73 | ], 74 | 75 | 'redis' => [ 76 | 'driver' => 'redis', 77 | 'connection' => 'cache', 78 | ], 79 | 80 | 'dynamodb' => [ 81 | 'driver' => 'dynamodb', 82 | 'key' => env('AWS_ACCESS_KEY_ID'), 83 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 84 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 85 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 86 | 'endpoint' => env('DYNAMODB_ENDPOINT'), 87 | ], 88 | 89 | ], 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Cache Key Prefix 94 | |-------------------------------------------------------------------------- 95 | | 96 | | When utilizing a RAM based store such as APC or Memcached, there might 97 | | be other applications utilizing the same cache. So, we'll specify a 98 | | value to get prefixed to all our keys so we can avoid collisions. 99 | | 100 | */ 101 | 102 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), 103 | 104 | ]; 105 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | env('DB_CONNECTION', 'mysql'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Database Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here are each of the database connections setup for your application. 26 | | Of course, examples of configuring each database platform that is 27 | | supported by Laravel is shown below to make development simple. 28 | | 29 | | 30 | | All database work in Laravel is done through the PHP PDO facilities 31 | | so make sure you have the driver for your particular database of 32 | | choice installed on your machine before you begin development. 33 | | 34 | */ 35 | 36 | 'connections' => [ 37 | 38 | 'sqlite' => [ 39 | 'driver' => 'sqlite', 40 | 'url' => env('DATABASE_URL'), 41 | 'database' => env('DB_DATABASE', database_path('database.sqlite')), 42 | 'prefix' => '', 43 | 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), 44 | ], 45 | 46 | 'mysql' => [ 47 | 'driver' => 'mysql', 48 | 'url' => env('DATABASE_URL'), 49 | 'host' => env('DB_HOST', '127.0.0.1'), 50 | 'port' => env('DB_PORT', '3304'), 51 | 'database' => env('DB_DATABASE', 'dbs'), 52 | 'username' => env('DB_USERNAME', 'kasir'), 53 | 'password' => env('DB_PASSWORD', 'kasir'), 54 | 'unix_socket' => env('DB_SOCKET', ''), 55 | 'charset' => 'utf8mb4', 56 | 'collation' => 'utf8mb4_unicode_ci', 57 | 'prefix' => '', 58 | 'prefix_indexes' => true, 59 | 'strict' => true, 60 | 'engine' => null, 61 | 'options' => extension_loaded('pdo_mysql') ? array_filter([ 62 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), 63 | ]) : [], 64 | ], 65 | 66 | 'pgsql' => [ 67 | 'driver' => 'pgsql', 68 | 'url' => env('DATABASE_URL'), 69 | 'host' => env('DB_HOST', '127.0.0.1'), 70 | 'port' => env('DB_PORT', '5432'), 71 | 'database' => env('DB_DATABASE', 'forge'), 72 | 'username' => env('DB_USERNAME', 'forge'), 73 | 'password' => env('DB_PASSWORD', ''), 74 | 'charset' => 'utf8', 75 | 'prefix' => '', 76 | 'prefix_indexes' => true, 77 | 'schema' => 'public', 78 | 'sslmode' => 'prefer', 79 | ], 80 | 81 | 'sqlsrv' => [ 82 | 'driver' => 'sqlsrv', 83 | 'url' => env('DATABASE_URL'), 84 | 'host' => env('DB_HOST', 'localhost'), 85 | 'port' => env('DB_PORT', '1433'), 86 | 'database' => env('DB_DATABASE', 'forge'), 87 | 'username' => env('DB_USERNAME', 'forge'), 88 | 'password' => env('DB_PASSWORD', ''), 89 | 'charset' => 'utf8', 90 | 'prefix' => '', 91 | 'prefix_indexes' => true, 92 | ], 93 | 94 | ], 95 | 96 | /* 97 | |-------------------------------------------------------------------------- 98 | | Migration Repository Table 99 | |-------------------------------------------------------------------------- 100 | | 101 | | This table keeps track of all the migrations that have already run for 102 | | your application. Using this information, we can determine which of 103 | | the migrations on disk haven't actually been run in the database. 104 | | 105 | */ 106 | 107 | 'migrations' => 'migrations', 108 | 109 | /* 110 | |-------------------------------------------------------------------------- 111 | | Redis Databases 112 | |-------------------------------------------------------------------------- 113 | | 114 | | Redis is an open source, fast, and advanced key-value store that also 115 | | provides a richer body of commands than a typical key-value system 116 | | such as APC or Memcached. Laravel makes it easy to dig right in. 117 | | 118 | */ 119 | 120 | 'redis' => [ 121 | 122 | 'client' => env('REDIS_CLIENT', 'phpredis'), 123 | 124 | 'options' => [ 125 | 'cluster' => env('REDIS_CLUSTER', 'redis'), 126 | 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), 127 | ], 128 | 129 | 'default' => [ 130 | 'url' => env('REDIS_URL'), 131 | 'host' => env('REDIS_HOST', '127.0.0.1'), 132 | 'password' => env('REDIS_PASSWORD', null), 133 | 'port' => env('REDIS_PORT', '6379'), 134 | 'database' => env('REDIS_DB', '0'), 135 | ], 136 | 137 | 'cache' => [ 138 | 'url' => env('REDIS_URL'), 139 | 'host' => env('REDIS_HOST', '127.0.0.1'), 140 | 'password' => env('REDIS_PASSWORD', null), 141 | 'port' => env('REDIS_PORT', '6379'), 142 | 'database' => env('REDIS_CACHE_DB', '1'), 143 | ], 144 | 145 | ], 146 | 147 | ]; 148 | -------------------------------------------------------------------------------- /config/excel.php: -------------------------------------------------------------------------------- 1 | [ 8 | 9 | /* 10 | |-------------------------------------------------------------------------- 11 | | Chunk size 12 | |-------------------------------------------------------------------------- 13 | | 14 | | When using FromQuery, the query is automatically chunked. 15 | | Here you can specify how big the chunk should be. 16 | | 17 | */ 18 | 'chunk_size' => 1000, 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Pre-calculate formulas during export 23 | |-------------------------------------------------------------------------- 24 | */ 25 | 'pre_calculate_formulas' => false, 26 | 27 | /* 28 | |-------------------------------------------------------------------------- 29 | | CSV Settings 30 | |-------------------------------------------------------------------------- 31 | | 32 | | Configure e.g. delimiter, enclosure and line ending for CSV exports. 33 | | 34 | */ 35 | 'csv' => [ 36 | 'delimiter' => ',', 37 | 'enclosure' => '"', 38 | 'line_ending' => PHP_EOL, 39 | 'use_bom' => false, 40 | 'include_separator_line' => false, 41 | 'excel_compatibility' => false, 42 | ], 43 | ], 44 | 45 | 'imports' => [ 46 | 47 | 'read_only' => true, 48 | 49 | 'heading_row' => [ 50 | 51 | /* 52 | |-------------------------------------------------------------------------- 53 | | Heading Row Formatter 54 | |-------------------------------------------------------------------------- 55 | | 56 | | Configure the heading row formatter. 57 | | Available options: none|slug|custom 58 | | 59 | */ 60 | 'formatter' => 'slug', 61 | ], 62 | 63 | /* 64 | |-------------------------------------------------------------------------- 65 | | CSV Settings 66 | |-------------------------------------------------------------------------- 67 | | 68 | | Configure e.g. delimiter, enclosure and line ending for CSV imports. 69 | | 70 | */ 71 | 'csv' => [ 72 | 'delimiter' => ',', 73 | 'enclosure' => '"', 74 | 'escape_character' => '\\', 75 | 'contiguous' => false, 76 | 'input_encoding' => 'UTF-8', 77 | ], 78 | ], 79 | 80 | /* 81 | |-------------------------------------------------------------------------- 82 | | Extension detector 83 | |-------------------------------------------------------------------------- 84 | | 85 | | Configure here which writer type should be used when 86 | | the package needs to guess the correct type 87 | | based on the extension alone. 88 | | 89 | */ 90 | 'extension_detector' => [ 91 | 'xlsx' => Excel::XLSX, 92 | 'xlsm' => Excel::XLSX, 93 | 'xltx' => Excel::XLSX, 94 | 'xltm' => Excel::XLSX, 95 | 'xls' => Excel::XLS, 96 | 'xlt' => Excel::XLS, 97 | 'ods' => Excel::ODS, 98 | 'ots' => Excel::ODS, 99 | 'slk' => Excel::SLK, 100 | 'xml' => Excel::XML, 101 | 'gnumeric' => Excel::GNUMERIC, 102 | 'htm' => Excel::HTML, 103 | 'html' => Excel::HTML, 104 | 'csv' => Excel::CSV, 105 | 'tsv' => Excel::TSV, 106 | 107 | /* 108 | |-------------------------------------------------------------------------- 109 | | PDF Extension 110 | |-------------------------------------------------------------------------- 111 | | 112 | | Configure here which Pdf driver should be used by default. 113 | | Available options: Excel::MPDF | Excel::TCPDF | Excel::DOMPDF 114 | | 115 | */ 116 | 'pdf' => Excel::DOMPDF, 117 | ], 118 | 119 | 'value_binder' => [ 120 | 121 | /* 122 | |-------------------------------------------------------------------------- 123 | | Default Value Binder 124 | |-------------------------------------------------------------------------- 125 | | 126 | | PhpSpreadsheet offers a way to hook into the process of a value being 127 | | written to a cell. In there some assumptions are made on how the 128 | | value should be formatted. If you want to change those defaults, 129 | | you can implement your own default value binder. 130 | | 131 | */ 132 | 'default' => Maatwebsite\Excel\DefaultValueBinder::class, 133 | ], 134 | 135 | 'transactions' => [ 136 | 137 | /* 138 | |-------------------------------------------------------------------------- 139 | | Transaction Handler 140 | |-------------------------------------------------------------------------- 141 | | 142 | | By default the import is wrapped in a transaction. This is useful 143 | | for when an import may fail and you want to retry it. With the 144 | | transactions, the previous import gets rolled-back. 145 | | 146 | | You can disable the transaction handler by setting this to null. 147 | | Or you can choose a custom made transaction handler here. 148 | | 149 | | Supported handlers: null|db 150 | | 151 | */ 152 | 'handler' => 'db', 153 | ], 154 | 155 | 'temporary_files' => [ 156 | 157 | /* 158 | |-------------------------------------------------------------------------- 159 | | Local Temporary Path 160 | |-------------------------------------------------------------------------- 161 | | 162 | | When exporting and importing files, we use a temporary file, before 163 | | storing reading or downloading. Here you can customize that path. 164 | | 165 | */ 166 | 'local_path' => sys_get_temp_dir(), 167 | 168 | /* 169 | |-------------------------------------------------------------------------- 170 | | Remote Temporary Disk 171 | |-------------------------------------------------------------------------- 172 | | 173 | | When dealing with a multi server setup with queues in which you 174 | | cannot rely on having a shared local temporary path, you might 175 | | want to store the temporary file on a shared disk. During the 176 | | queue executing, we'll retrieve the temporary file from that 177 | | location instead. When left to null, it will always use 178 | | the local path. This setting only has effect when using 179 | | in conjunction with queued imports and exports. 180 | | 181 | */ 182 | 'remote_disk' => null, 183 | 'remote_prefix' => null, 184 | 185 | ], 186 | ]; 187 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Cloud Filesystem Disk 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Many applications store files both locally and in the cloud. For this 24 | | reason, you may specify a default "cloud" driver here. This driver 25 | | will be bound as the Cloud disk implementation in the container. 26 | | 27 | */ 28 | 29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Filesystem Disks 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may configure as many filesystem "disks" as you wish, and you 37 | | may even configure multiple disks of the same driver. Defaults have 38 | | been setup for each driver as an example of the required options. 39 | | 40 | | Supported Drivers: "local", "ftp", "sftp", "s3" 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 | 'url' => env('APP_URL').'/storage', 55 | 'visibility' => 'public', 56 | ], 57 | 58 | 's3' => [ 59 | 'driver' => 's3', 60 | 'key' => env('AWS_ACCESS_KEY_ID'), 61 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 62 | 'region' => env('AWS_DEFAULT_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | 'url' => env('AWS_URL'), 65 | 'endpoint' => env('AWS_ENDPOINT'), 66 | ], 67 | 68 | ], 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Symbolic Links 73 | |-------------------------------------------------------------------------- 74 | | 75 | | Here you may configure the symbolic links that will be created when the 76 | | `storage:link` Artisan command is executed. The array keys should be 77 | | the locations of the links and the values should be their targets. 78 | | 79 | */ 80 | 81 | 'links' => [ 82 | public_path('storage') => storage_path('app/public'), 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 1024, 48 | 'threads' => 2, 49 | 'time' => 2, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 21 | 22 | /* 23 | |-------------------------------------------------------------------------- 24 | | Log Channels 25 | |-------------------------------------------------------------------------- 26 | | 27 | | Here you may configure the log channels for your application. Out of 28 | | the box, Laravel uses the Monolog PHP logging library. This gives 29 | | you a variety of powerful log handlers / formatters to utilize. 30 | | 31 | | Available Drivers: "single", "daily", "slack", "syslog", 32 | | "errorlog", "monolog", 33 | | "custom", "stack" 34 | | 35 | */ 36 | 37 | 'channels' => [ 38 | 'stack' => [ 39 | 'driver' => 'stack', 40 | 'channels' => ['single'], 41 | 'ignore_exceptions' => false, 42 | ], 43 | 44 | 'single' => [ 45 | 'driver' => 'single', 46 | 'path' => storage_path('logs/laravel.log'), 47 | 'level' => 'debug', 48 | ], 49 | 50 | 'daily' => [ 51 | 'driver' => 'daily', 52 | 'path' => storage_path('logs/laravel.log'), 53 | 'level' => 'debug', 54 | 'days' => 14, 55 | ], 56 | 57 | 'slack' => [ 58 | 'driver' => 'slack', 59 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 60 | 'username' => 'Laravel Log', 61 | 'emoji' => ':boom:', 62 | 'level' => 'critical', 63 | ], 64 | 65 | 'papertrail' => [ 66 | 'driver' => 'monolog', 67 | 'level' => 'debug', 68 | 'handler' => SyslogUdpHandler::class, 69 | 'handler_with' => [ 70 | 'host' => env('PAPERTRAIL_URL'), 71 | 'port' => env('PAPERTRAIL_PORT'), 72 | ], 73 | ], 74 | 75 | 'stderr' => [ 76 | 'driver' => 'monolog', 77 | 'handler' => StreamHandler::class, 78 | 'formatter' => env('LOG_STDERR_FORMATTER'), 79 | 'with' => [ 80 | 'stream' => 'php://stderr', 81 | ], 82 | ], 83 | 84 | 'syslog' => [ 85 | 'driver' => 'syslog', 86 | 'level' => 'debug', 87 | ], 88 | 89 | 'errorlog' => [ 90 | 'driver' => 'errorlog', 91 | 'level' => 'debug', 92 | ], 93 | 94 | 'null' => [ 95 | 'driver' => 'monolog', 96 | 'handler' => NullHandler::class, 97 | ], 98 | 99 | 'emergency' => [ 100 | 'path' => storage_path('logs/laravel.log'), 101 | ], 102 | ], 103 | 104 | ]; 105 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_MAILER', 'smtp'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Mailer Configurations 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure all of the mailers used by your application plus 24 | | their respective settings. Several examples have been configured for 25 | | you and you are free to add your own as your application requires. 26 | | 27 | | Laravel supports a variety of mail "transport" drivers to be used while 28 | | sending an e-mail. You will specify which one you are using for your 29 | | mailers below. You are free to add additional mailers as required. 30 | | 31 | | Supported: "smtp", "sendmail", "mailgun", "ses", 32 | | "postmark", "log", "array" 33 | | 34 | */ 35 | 36 | 'mailers' => [ 37 | 'smtp' => [ 38 | 'transport' => 'smtp', 39 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 40 | 'port' => env('MAIL_PORT', 587), 41 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 42 | 'username' => env('MAIL_USERNAME'), 43 | 'password' => env('MAIL_PASSWORD'), 44 | 'timeout' => null, 45 | ], 46 | 47 | 'ses' => [ 48 | 'transport' => 'ses', 49 | ], 50 | 51 | 'mailgun' => [ 52 | 'transport' => 'mailgun', 53 | ], 54 | 55 | 'postmark' => [ 56 | 'transport' => 'postmark', 57 | ], 58 | 59 | 'sendmail' => [ 60 | 'transport' => 'sendmail', 61 | 'path' => '/usr/sbin/sendmail -bs', 62 | ], 63 | 64 | 'log' => [ 65 | 'transport' => 'log', 66 | 'channel' => env('MAIL_LOG_CHANNEL'), 67 | ], 68 | 69 | 'array' => [ 70 | 'transport' => 'array', 71 | ], 72 | ], 73 | 74 | /* 75 | |-------------------------------------------------------------------------- 76 | | Global "From" Address 77 | |-------------------------------------------------------------------------- 78 | | 79 | | You may wish for all e-mails sent by your application to be sent from 80 | | the same address. Here, you may specify a name and address that is 81 | | used globally for all e-mails that are sent by your application. 82 | | 83 | */ 84 | 85 | 'from' => [ 86 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 87 | 'name' => env('MAIL_FROM_NAME', 'Example'), 88 | ], 89 | 90 | /* 91 | |-------------------------------------------------------------------------- 92 | | Markdown Mail Settings 93 | |-------------------------------------------------------------------------- 94 | | 95 | | If you are using Markdown based email rendering, you may configure your 96 | | theme and component paths here, allowing you to customize the design 97 | | of the emails. Or, you may simply stick with the Laravel defaults! 98 | | 99 | */ 100 | 101 | 'markdown' => [ 102 | 'theme' => 'default', 103 | 104 | 'paths' => [ 105 | resource_path('views/vendor/mail'), 106 | ], 107 | ], 108 | 109 | ]; 110 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'sync'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection information for each server that 24 | | is used by your application. A default configuration has been added 25 | | for each back-end shipped with Laravel. You are free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | 'block_for' => 0, 50 | ], 51 | 52 | 'sqs' => [ 53 | 'driver' => 'sqs', 54 | 'key' => env('AWS_ACCESS_KEY_ID'), 55 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 56 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 57 | 'queue' => env('SQS_QUEUE', 'your-queue-name'), 58 | 'suffix' => env('SQS_SUFFIX'), 59 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 60 | ], 61 | 62 | 'redis' => [ 63 | 'driver' => 'redis', 64 | 'connection' => 'default', 65 | 'queue' => env('REDIS_QUEUE', 'default'), 66 | 'retry_after' => 90, 67 | 'block_for' => null, 68 | ], 69 | 70 | ], 71 | 72 | /* 73 | |-------------------------------------------------------------------------- 74 | | Failed Queue Jobs 75 | |-------------------------------------------------------------------------- 76 | | 77 | | These options configure the behavior of failed queue job logging so you 78 | | can control which database and table are used to store the jobs that 79 | | have failed. You may change them to any database / table you wish. 80 | | 81 | */ 82 | 83 | 'failed' => [ 84 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database'), 85 | 'database' => env('DB_CONNECTION', 'mysql'), 86 | 'table' => 'failed_jobs', 87 | ], 88 | 89 | ]; 90 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 31 | ], 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | *.sqlite-journal 3 | -------------------------------------------------------------------------------- /database/factories/CategoryFactory.php: -------------------------------------------------------------------------------- 1 | define(Category::class, function (Faker $faker) { 9 | return [ 10 | 'name' => $faker->colorName 11 | ]; 12 | }); 13 | -------------------------------------------------------------------------------- /database/factories/ProductFactory.php: -------------------------------------------------------------------------------- 1 | define(Product::class, function (Faker $faker) { 9 | return [ 10 | 'name' => $faker->word, 11 | 'description' => $faker->text(50), 12 | 'product_left' => $faker->randomNumber(2), 13 | 'price' => $faker->numberBetween(10, 500), 14 | 'category_id' => $faker->numberBetween(1, 2) 15 | ]; 16 | }); 17 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id('id'); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->string('phone')->nullable(); 21 | $table->timestamp('email_verified_at')->nullable(); 22 | $table->string('password'); 23 | $table->boolean('administrator')->default(false); 24 | $table->rememberToken(); 25 | $table->timestamps(); 26 | $table->engine = 'InnoDB'; 27 | $table->charset = 'utf8mb4'; 28 | $table->collation = 'utf8mb4_general_ci'; 29 | }); 30 | } 31 | 32 | /** 33 | * Reverse the migrations. 34 | * 35 | * @return void 36 | */ 37 | public function down() 38 | { 39 | Schema::dropIfExists('users'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2019_08_19_000000_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->text('connection'); 19 | $table->text('queue'); 20 | $table->longText('payload'); 21 | $table->longText('exception'); 22 | $table->timestamp('failed_at')->useCurrent(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('failed_jobs'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2020_04_13_160458_create_clients_table.php: -------------------------------------------------------------------------------- 1 | string('rfc'); 18 | $table->string('name'); 19 | $table->string('email')->unique()->nullable(); 20 | $table->string('phone')->unique()->nullable(); 21 | $table->mediumText('address')->nullable(); 22 | $table->timestamps(); 23 | $table->primary('rfc'); 24 | $table->engine = 'InnoDB'; 25 | $table->charset = 'utf8mb4'; 26 | $table->collation = 'utf8mb4_general_ci'; 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('clients'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /database/migrations/2020_04_13_160512_create_categories_table.php: -------------------------------------------------------------------------------- 1 | id('category_id'); 18 | $table->string('name'); 19 | $table->timestamps(); 20 | $table->engine = 'InnoDB'; 21 | $table->charset = 'utf8mb4'; 22 | $table->collation = 'utf8mb4_general_ci'; 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('categories'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2020_04_13_160525_create_sales_table.php: -------------------------------------------------------------------------------- 1 | id('sale_id'); 19 | $table->unsignedFloat('total'); 20 | $table->string('rfc'); 21 | $table->unsignedBigInteger('id'); 22 | $table->timestamps(); 23 | $table->date('created')->nullable(); 24 | $table->foreign('id')->references('id')->on('users')->onDelete('cascade'); 25 | $table->foreign('rfc')->references('rfc')->on('clients'); 26 | $table->engine = 'InnoDB'; 27 | $table->charset = 'utf8mb4'; 28 | $table->collation = 'utf8mb4_general_ci'; 29 | }); 30 | } 31 | 32 | /** 33 | * Reverse the migrations. 34 | * 35 | * @return void 36 | */ 37 | public function down() 38 | { 39 | Schema::dropIfExists('sales'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/migrations/2020_04_13_160541_create_products_table.php: -------------------------------------------------------------------------------- 1 | id('product_id'); 18 | $table->string('name'); 19 | $table->text('description')->nullable(); 20 | $table->integer('product_left')->nullable(); 21 | $table->unsignedFloat('price'); 22 | $table->unsignedFloat('cost')->nullable(); 23 | $table->unsignedBigInteger('category_id'); 24 | $table->foreign('category_id')->references('category_id') 25 | ->on('categories')->onDelete('cascade'); 26 | $table->timestamps(); 27 | $table->engine = 'InnoDB'; 28 | $table->charset = 'utf8mb4'; 29 | $table->collation = 'utf8mb4_general_ci'; 30 | }); 31 | } 32 | 33 | /** 34 | * Reverse the migrations. 35 | * 36 | * @return void 37 | */ 38 | public function down() 39 | { 40 | Schema::dropIfExists('products'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /database/migrations/2020_04_13_160554_create_carts_table.php: -------------------------------------------------------------------------------- 1 | unsignedBigInteger('sale_id'); 18 | $table->unsignedBigInteger('product_id'); 19 | $table->unsignedInteger('amount'); 20 | $table->primary(['sale_id', 'product_id']); 21 | $table->foreign('sale_id')->references('sale_id')->on('sales') 22 | ->onDelete('cascade'); 23 | $table->foreign('product_id')->references('product_id')->on('products')->onDelete('cascade'); 24 | $table->timestamps(); 25 | $table->date('created')->nullable(); 26 | $table->engine = 'InnoDB'; 27 | $table->charset = 'utf8mb4'; 28 | $table->collation = 'utf8mb4_general_ci'; 29 | }); 30 | } 31 | 32 | /** 33 | * Reverse the migrations. 34 | * 35 | * @return void 36 | */ 37 | public function down() 38 | { 39 | Schema::dropIfExists('carts'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UsersTableSeeder::class); 17 | DB::table('users')->insert([ 18 | 'name' => 'admin', 19 | 'email' => 'admin@admin.com', 20 | 'password' => Hash::make('12345678'), 21 | ]); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /img/Screenshot_2020-05-27 INVOICE ONLINE(1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/img/Screenshot_2020-05-27 INVOICE ONLINE(1).png -------------------------------------------------------------------------------- /img/Screenshot_2020-05-27 INVOICE ONLINE(2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/img/Screenshot_2020-05-27 INVOICE ONLINE(2).png -------------------------------------------------------------------------------- /img/Screenshot_2020-05-27 INVOICE ONLINE(3).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/img/Screenshot_2020-05-27 INVOICE ONLINE(3).png -------------------------------------------------------------------------------- /img/Screenshot_2020-05-27 INVOICE ONLINE(4).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/img/Screenshot_2020-05-27 INVOICE ONLINE(4).png -------------------------------------------------------------------------------- /img/Screenshot_2020-05-27 INVOICE ONLINE(5).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/img/Screenshot_2020-05-27 INVOICE ONLINE(5).png -------------------------------------------------------------------------------- /img/Screenshot_2020-05-27 INVOICE ONLINE(6).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/img/Screenshot_2020-05-27 INVOICE ONLINE(6).png -------------------------------------------------------------------------------- /img/Screenshot_2020-05-27 INVOICE ONLINE(7).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/img/Screenshot_2020-05-27 INVOICE ONLINE(7).png -------------------------------------------------------------------------------- /img/Screenshot_2020-05-27 INVOICE ONLINE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/img/Screenshot_2020-05-27 INVOICE ONLINE.png -------------------------------------------------------------------------------- /img/Screenshot_2020-05-27 POS(1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/img/Screenshot_2020-05-27 POS(1).png -------------------------------------------------------------------------------- /img/Screenshot_2020-05-27 Z POS Web Apps(1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/img/Screenshot_2020-05-27 Z POS Web Apps(1).png -------------------------------------------------------------------------------- /img/Screenshot_2020-05-27 Z POS Web Apps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/img/Screenshot_2020-05-27 Z POS Web Apps.png -------------------------------------------------------------------------------- /img/Screenshotsa_2020-05-27 INVOICE ONLINE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/img/Screenshotsa_2020-05-27 INVOICE ONLINE.png -------------------------------------------------------------------------------- /img/update1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/img/update1.jpg -------------------------------------------------------------------------------- /img/update2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/img/update2.jpg -------------------------------------------------------------------------------- /img/update3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/img/update3.png -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | ./tests/Unit 9 | 10 | 11 | ./tests/Feature 12 | 13 | 14 | 15 | 16 | ./app 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/public/favicon.ico -------------------------------------------------------------------------------- /public/img/aplikasi kasir invoice online zinvoice.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/public/img/aplikasi kasir invoice online zinvoice.jpg -------------------------------------------------------------------------------- /public/img/app toko kasir invoice online.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/public/img/app toko kasir invoice online.jpg -------------------------------------------------------------------------------- /public/img/kasir invoice online web app.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/public/img/kasir invoice online web app.jpg -------------------------------------------------------------------------------- /public/img/laravel.svg: -------------------------------------------------------------------------------- 1 | Logotype -------------------------------------------------------------------------------- /public/img/mesin kasir online zinvoice.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mesinkasir/larapos/5a3303147a52dbfdefd3749afdb7221d5f8e56c7/public/img/mesin kasir online zinvoice.jpg -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | define('LARAVEL_START', microtime(true)); 11 | 12 | /* 13 | |-------------------------------------------------------------------------- 14 | | Register The Auto Loader 15 | |-------------------------------------------------------------------------- 16 | | 17 | | Composer provides a convenient, automatically generated class loader for 18 | | our application. We just need to utilize it! We'll simply require it 19 | | into the script here so that we don't have to worry about manual 20 | | loading any of our classes later on. It feels great to relax. 21 | | 22 | */ 23 | 24 | require __DIR__.'/../vendor/autoload.php'; 25 | 26 | /* 27 | |-------------------------------------------------------------------------- 28 | | Turn On The Lights 29 | |-------------------------------------------------------------------------- 30 | | 31 | | We need to illuminate PHP development, so let us turn on the lights. 32 | | This bootstraps the framework and gets it ready for use, then it 33 | | will load up this application so that we can run it and send 34 | | the responses back to the browser and delight our users. 35 | | 36 | */ 37 | 38 | $app = require_once __DIR__.'/../bootstrap/app.php'; 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Run The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once we have the application, we can handle the incoming request 46 | | through the kernel, and send the associated response back to 47 | | the client's browser allowing them to enjoy the creative 48 | | and wonderful application we have prepared for them. 49 | | 50 | */ 51 | 52 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 53 | 54 | $response = $kernel->handle( 55 | $request = Illuminate\Http\Request::capture() 56 | ); 57 | 58 | $response->send(); 59 | 60 | $kernel->terminate($request, $response); 61 | -------------------------------------------------------------------------------- /public/js/app.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v4.4.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | /*! 8 | * Sizzle CSS Selector Engine v2.3.5 9 | * https://sizzlejs.com/ 10 | * 11 | * Copyright JS Foundation and other contributors 12 | * Released under the MIT license 13 | * https://js.foundation/ 14 | * 15 | * Date: 2020-03-14 16 | */ 17 | 18 | /*! 19 | * Vue.js v2.6.11 20 | * (c) 2014-2019 Evan You 21 | * Released under the MIT License. 22 | */ 23 | 24 | /*! 25 | * jQuery JavaScript Library v3.5.0 26 | * https://jquery.com/ 27 | * 28 | * Includes Sizzle.js 29 | * https://sizzlejs.com/ 30 | * 31 | * Copyright JS Foundation and other contributors 32 | * Released under the MIT license 33 | * https://jquery.org/license 34 | * 35 | * Date: 2020-04-10T15:07Z 36 | */ 37 | 38 | /** 39 | * @license 40 | * Lodash 41 | * Copyright OpenJS Foundation and other contributors 42 | * Released under MIT license 43 | * Based on Underscore.js 1.8.3 44 | * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 45 | */ 46 | 47 | /**! 48 | * @fileOverview Kickass library to create and place poppers near their reference elements. 49 | * @version 1.16.1 50 | * @license 51 | * Copyright (c) 2016 Federico Zivolo and contributors 52 | * 53 | * Permission is hereby granted, free of charge, to any person obtaining a copy 54 | * of this software and associated documentation files (the "Software"), to deal 55 | * in the Software without restriction, including without limitation the rights 56 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 57 | * copies of the Software, and to permit persons to whom the Software is 58 | * furnished to do so, subject to the following conditions: 59 | * 60 | * The above copyright notice and this permission notice shall be included in all 61 | * copies or substantial portions of the Software. 62 | * 63 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 64 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 65 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 66 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 67 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 68 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 69 | * SOFTWARE. 70 | */ 71 | -------------------------------------------------------------------------------- /public/js/bos.js: -------------------------------------------------------------------------------- 1 | window.FontAwesomeKitConfig = {"asyncLoading":{"enabled":true},"autoA11y":{"enabled":true},"baseUrl":"https://kit-free.fontawesome.com","license":"free","method":"css","minify":{"enabled":true},"v4shim":{"enabled":true},"version":"latest"}; 2 | !function(){!function(){if(!(void 0===window.Element||"classList"in document.documentElement)){var e,t,n,i=Array.prototype,o=i.push,a=i.splice,s=i.join;r.prototype={add:function(e){this.contains(e)||(o.call(this,e),this.el.className=this.toString())},contains:function(e){return-1!=this.el.className.indexOf(e)},item:function(e){return this[e]||null},remove:function(e){if(this.contains(e)){for(var t=0;tmesin kasir`); -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/app.js": "/js/app.js", 3 | "/css/app.css": "/css/app.css" 4 | } 5 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * First we will load all of this project's JavaScript dependencies which 3 | * includes Vue and other libraries. It is a great starting point when 4 | * building robust, powerful web applications using Vue and Laravel. 5 | */ 6 | 7 | require('./bootstrap'); 8 | require('./sales'); 9 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | window._ = require('lodash'); 2 | 3 | /** 4 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 5 | * for JavaScript based Bootstrap features such as modals and tabs. This 6 | * code may be modified to fit the specific needs of your application. 7 | */ 8 | 9 | try { 10 | window.Popper = require('popper.js').default; 11 | window.$ = window.jQuery = require('jquery'); 12 | 13 | require('bootstrap'); 14 | require('admin-lte'); 15 | } catch (e) {} 16 | 17 | /** 18 | * We'll load the axios HTTP library which allows us to easily issue requests 19 | * to our Laravel back-end. This library automatically handles sending the 20 | * CSRF token as a header based on the value of the "XSRF" token cookie. 21 | */ 22 | 23 | window.axios = require('axios'); 24 | 25 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 26 | 27 | /** 28 | * Echo exposes an expressive API for subscribing to channels and listening 29 | * for events that are broadcast by Laravel. Echo and event broadcasting 30 | * allows your team to easily build robust real-time web applications. 31 | */ 32 | 33 | // import Echo from 'laravel-echo'; 34 | 35 | // window.Pusher = require('pusher-js'); 36 | 37 | // window.Echo = new Echo({ 38 | // broadcaster: 'pusher', 39 | // key: process.env.MIX_PUSHER_APP_KEY, 40 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 41 | // encrypted: true 42 | // }); -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'Wrong Password or Username!', 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 | 'Your password has been reset!', 17 | 'sent' => 'We have emailed your password reset link!', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that email address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/pos/aplikasikasir.js: -------------------------------------------------------------------------------- 1 | var popoverTriggerList=[].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')),popoverList=popoverTriggerList.map(function(e){return new bootstrap.Popover(e)}),tooltipTriggerList=[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')),tooltipList=tooltipTriggerList.map(function(e){return new bootstrap.Tooltip(e)});function setAttributes(t,o){Object.keys(o).forEach(function(e){t.setAttribute(e,o[e])})}var popoverList=(popoverTriggerList=[].slice.call(document.querySelectorAll('[data-toggle="popover"]'))).map(function(e){return new bootstrap.Popover(e)}),tooltipList=(tooltipTriggerList=[].slice.call(document.querySelectorAll('[data-toggle="tooltip"]'))).map(function(e){return new bootstrap.Tooltip(e)}),total=document.querySelectorAll(".nav-pills");function getEventTarget(e){return(e=e||window.event).target||e.srcElement}function copyCode(e){const t=window.getSelection(),o=document.createRange();var l=e.nextElementSibling;o.selectNodeContents(l),t.removeAllRanges(),t.addRange(o);var n;document.execCommand("copy");window.getSelection().removeAllRanges(),e.parentElement.querySelector(".alert")||((n=document.createElement("div")).classList.add("alert","alert-success","position-absolute","top-0","border-0","text-white","w-25","end-0","start-0","mt-2","mx-auto","py-2"),n.style.transform="translate3d(0px, 0px, 0px)",n.style.opacity="0",n.style.transition=".35s ease",setTimeout(function(){n.style.transform="translate3d(0px, 20px, 0px)",n.style.setProperty("opacity","1","important")},100),n.innerHTML="Code successfully copied!",e.parentElement.appendChild(n),setTimeout(function(){n.style.transform="translate3d(0px, 0px, 0px)",n.style.setProperty("opacity","0","important")},2e3),setTimeout(function(){e.parentElement.querySelector(".alert").remove()},2500))}function debounce(o,l,n){var i;return function(){var e=this,t=arguments;clearTimeout(i),i=setTimeout(function(){i=null,n||o.apply(e,t)},l),n&&!i&&o.apply(e,t)}}total.forEach(function(i,e){var r=document.createElement("div"),t=i.querySelector("li:first-child .nav-link").cloneNode();t.innerHTML="-",r.classList.add("moving-tab","position-absolute","nav-link"),r.appendChild(t),i.appendChild(r);i.getElementsByTagName("li").length;r.style.padding="0px",r.style.width=i.querySelector("li:nth-child(1)").offsetWidth+"px",r.style.transform="translate3d(0px, 0px, 0px)",r.style.transition=".5s ease",i.onmouseover=function(e){let t=getEventTarget(e),l=t.closest("li");if(l){let o=Array.from(l.closest("ul").children);var n=o.indexOf(l)+1;i.querySelector("li:nth-child("+n+") .nav-link").onclick=function(){r=i.querySelector(".moving-tab");let e=0;if(i.classList.contains("flex-column")){for(var t=1;t<=o.indexOf(l);t++)e+=i.querySelector("li:nth-child("+t+")").offsetHeight;r.style.transform="translate3d(0px,"+e+"px, 0px)",r.style.height=i.querySelector("li:nth-child("+t+")").offsetHeight}else{for(t=1;t<=o.indexOf(l);t++)e+=i.querySelector("li:nth-child("+t+")").offsetWidth;r.style.transform="translate3d("+e+"px, 0px, 0px)",r.style.width=i.querySelector("li:nth-child("+n+")").offsetWidth+"px"}}}}}),window.addEventListener("resize",function(e){total.forEach(function(o,e){o.querySelector(".moving-tab").remove();var l=document.createElement("div"),n=o.querySelector(".nav-link.active").cloneNode();n.innerHTML="-",l.classList.add("moving-tab","position-absolute","nav-link"),l.appendChild(n),o.appendChild(l),l.style.padding="0px",l.style.transition=".5s ease";let i=o.querySelector(".nav-link.active").parentElement;if(i){let e=Array.from(i.closest("ul").children);n=e.indexOf(i)+1;let t=0;if(o.classList.contains("flex-column")){for(var r=1;r<=e.indexOf(i);r++)t+=o.querySelector("li:nth-child("+r+")").offsetHeight;l.style.transform="translate3d(0px,"+t+"px, 0px)",l.style.width=o.querySelector("li:nth-child("+n+")").offsetWidth+"px",l.style.height=o.querySelector("li:nth-child("+r+")").offsetHeight}else{for(r=1;r<=e.indexOf(i);r++)t+=o.querySelector("li:nth-child("+r+")").offsetWidth;l.style.transform="translate3d("+t+"px, 0px, 0px)",l.style.width=o.querySelector("li:nth-child("+n+")").offsetWidth+"px"}}}),window.innerWidth<991?total.forEach(function(e,t){e.classList.contains("flex-column")||e.classList.add("flex-column","on-resize")}):total.forEach(function(e,t){e.classList.contains("on-resize")&&e.classList.remove("flex-column","on-resize")})}); 2 | //# sourceMappingURL=_site_kit_free/assets/js/kit-free.js.map -------------------------------------------------------------------------------- /resources/pos/aplikasikasir.scss: -------------------------------------------------------------------------------- 1 | // ========================================================= 2 | // * Soft UI Design System - v1.0.2 3 | // ========================================================= 4 | // 5 | // * Product Page: https://www.creative-tim.com/product/soft-ui-design-system 6 | // * Copyright 2021 Creative Tim (https://www.creative-tim.com) 7 | // 8 | // Coded by www.creative-tim.com 9 | // 10 | // ========================================================= 11 | // 12 | // * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 13 | 14 | // Bootstrap Functions 15 | @import "soft-design-system/bootstrap/functions"; 16 | 17 | // Custom Variables 18 | @import "soft-design-system/custom/variables"; 19 | 20 | // Theme Variables 21 | @import "../scss/soft-design-system/variables"; 22 | 23 | // Bootstrap Core 24 | @import "soft-design-system/bootstrap/bootstrap"; 25 | 26 | // Theme Core 27 | @import "soft-design-system/theme"; 28 | 29 | // Custom Variables 30 | @import "soft-design-system/custom/styles"; 31 | -------------------------------------------------------------------------------- /resources/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | // Body 2 | $body-bg: #f8fafc; 3 | 4 | // Typography 5 | $font-family-sans-serif: 'Nunito', sans-serif; 6 | $font-size-base: 0.9rem; 7 | $line-height-base: 1.6; 8 | 9 | // Colors 10 | $blue: #3490dc; 11 | $indigo: #6574cd; 12 | $purple: #9561e2; 13 | $pink: #f66d9b; 14 | $red: #e3342f; 15 | $orange: #f6993f; 16 | $yellow: #ffed4a; 17 | $green: #38c172; 18 | $teal: #4dc0b5; 19 | $cyan: #6cb2eb; 20 | -------------------------------------------------------------------------------- /resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | // Fonts 2 | 3 | // Variables 4 | @import 'variables'; 5 | 6 | // Bootstrap 7 | @import '~bootstrap/scss/bootstrap'; 8 | @import "~admin-lte/dist/css/adminlte.min.css"; 9 | -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | Z POS Web Apps
-------------------------------------------------------------------------------- /resources/views/auth/passwords/admin.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/confirm.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Confirm Password') }}
9 | 10 |
11 | {{ __('Please confirm your password before continuing.') }} 12 | 13 |
14 | @csrf 15 | 16 |
17 | 18 | 19 |
20 | 21 | 22 | @error('password') 23 | 24 | {{ $message }} 25 | 26 | @enderror 27 |
28 |
29 | 30 |
31 |
32 | 35 | 36 | @if (Route::has('password.request')) 37 | 38 | {{ __('Forgot Your Password?') }} 39 | 40 | @endif 41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | @endsection 50 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/email.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Reset Password') }}
9 | 10 |
11 | @if (session('status')) 12 | 15 | @endif 16 | 17 |
18 | @csrf 19 | 20 |
21 | 22 | 23 |
24 | 25 | 26 | @error('email') 27 | 28 | {{ $message }} 29 | 30 | @enderror 31 |
32 |
33 | 34 |
35 |
36 | 39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | @endsection 48 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/pos.blade.php: -------------------------------------------------------------------------------- 1 | Invoice pos apps by -------------------------------------------------------------------------------- /resources/views/auth/passwords/reset.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Reset Password') }}
9 | 10 |
11 |
12 | @csrf 13 | 14 | 15 | 16 |
17 | 18 | 19 |
20 | 21 | 22 | @error('email') 23 | 24 | {{ $message }} 25 | 26 | @enderror 27 |
28 |
29 | 30 |
31 | 32 | 33 |
34 | 35 | 36 | @error('password') 37 | 38 | {{ $message }} 39 | 40 | @enderror 41 |
42 |
43 | 44 |
45 | 46 | 47 |
48 | 49 |
50 |
51 | 52 |
53 |
54 | 57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | @endsection 66 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/transaction.blade.php: -------------------------------------------------------------------------------- 1 | https://mesinkasironline.web.app -------------------------------------------------------------------------------- /resources/views/auth/pos.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/views/auth/register.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 | 8 |

9 | REGISTER USER 10 |

11 |
12 | @csrf 13 | 14 |
15 | 23 | 24 |
25 | 26 | 27 | @error('name') 28 | 29 | {{ $message }} 30 | 31 | @enderror 32 |
33 |
34 | 35 |
36 | 42 | 43 |
44 | 45 | 46 | @error('email') 47 | 48 | {{ $message }} 49 | 50 | @enderror 51 |
52 |
53 | 54 |
55 | 61 | 62 |
63 | 64 | 65 | @error('password') 66 | 67 | {{ $message }} 68 | 69 | @enderror 70 |
71 |
72 | 73 |
74 | 81 | 82 |
83 | 84 |
85 |
86 | 87 |
88 |
89 | 92 |
93 |
94 |
95 |
96 |
97 |
98 | @endsection 99 | -------------------------------------------------------------------------------- /resources/views/auth/verify.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Verify Your Email Address') }}
9 | 10 |
11 | @if (session('resent')) 12 | 15 | @endif 16 | 17 | {{ __('Before proceeding, please check your email for a verification link.') }} 18 | {{ __('If you did not receive the email') }}, 19 |
20 | @csrf 21 | . 22 |
23 |
24 |
25 |
26 |
27 |
28 | @endsection 29 | -------------------------------------------------------------------------------- /resources/views/categories/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') @section('content')

@if(session('created'))
Success create new categories
@endif
@if($errors->any())
@foreach($errors->all() as $error) - {{ $error }}
@endforeach
@endif
@csrf
@endsection -------------------------------------------------------------------------------- /resources/views/categories/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') @section('content')
2 |
3 |

4 |

5 | @if(isset($_SESSION['deleted']))
6 |
Success update data
7 |
@endif 8 |
9 |
10 |
11 |
{{ $categories->links() }} 12 |
@foreach($categories as $category)
13 |
14 |
15 | 16 | 17 | 18 | 19 |
20 |
{{ $category->name }}
21 |
22 |
@csrf @method('DELETE') 23 |
24 |
25 |
26 |
@endforeach {{ $categories->links() }} 27 |
28 |
@endsection -------------------------------------------------------------------------------- /resources/views/clients/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') @section('content')

Register New Customer

@if(session('created'))
Success create new user
@endif
@if($errors->any())
@foreach($errors->all() as $error) - {{ $error }}
@endforeach
@endif
@csrf
@endsection -------------------------------------------------------------------------------- /resources/views/clients/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') @section('content')

Edit Customer

@method('PUT')
@if($errors->any())
@foreach($errors->all() as $error) - {{ $error }}
@endforeach
@endif
@csrf
@endsection -------------------------------------------------------------------------------- /resources/views/clients/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') @section('content') 2 |
3 |
4 |

Customer

5 |

6 | New Customer @if(session('updated'))
7 |
8 |
Success Update Customer
9 |
10 |
@endif @if(session('deleted'))
11 |
12 |
Customer Deleted
13 |
14 |
@endif 15 |
16 |
17 |
18 |
19 |
@foreach($clients as $client)
20 |
21 |
22 | 23 | 24 | 25 |
26 |
{{ $client->name }}
27 |
28 | Edit 29 |
30 |
@csrf @method('DELETE') 31 |
32 |
33 |
34 |
35 |
@endforeach
36 |
37 |
38 | @endsection -------------------------------------------------------------------------------- /resources/views/data.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') @section('content')

@endsection -------------------------------------------------------------------------------- /resources/views/home.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') @section('content')
laravel

.


@endsection -------------------------------------------------------------------------------- /resources/views/office.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') @section('content') 2 | 3 | 4 | 14 | 15 |
laravel
@endsection -------------------------------------------------------------------------------- /resources/views/products/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') @section('content')

New Product

@if(session('created'))
Success Update
@endif
@if($errors->any())
@foreach($errors->all() as $error) - {{ $error }}
@endforeach
@endif
@csrf
@endsection -------------------------------------------------------------------------------- /resources/views/products/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') @section('content')


Edit Product

@if(session('updated'))
Edit and update success
@endif
@method('PUT')
@if($errors->any())
@foreach($errors->all() as $error) - {{ $error }}
@endforeach
@endif
@csrf
@endsection -------------------------------------------------------------------------------- /resources/views/products/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') @section('content')
2 |
3 |

Produck

4 |

Data Produk

5 | Create New Product 6 |
7 |
8 |
9 |
{{ $products->links() }} 10 |
@foreach($products as $product)
11 |
12 |
13 | 14 | 15 | 16 |
17 |
{{ $product->name }}
18 |

{{ $product->get_extract }}

19 |
20 | Edit 21 |
22 |
@csrf @method('DELETE') 23 |
24 |
25 |
26 |
@endforeach
{{ $products->links() }} 27 |
@endsection -------------------------------------------------------------------------------- /resources/views/sales/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') @section('content')

Point Of Sale

Income to day: Rp.{{ $totalSalesPerDay }}
@if(session('created'))
Transaction Success
@endif
@if($errors->any())
@foreach($errors->all() as $error) - {{ $error }}
@endforeach
@endif
IDProductQtySet
TOTAL Rp.0
@csrf

List Product

@foreach($products as $product) @endforeach
KodeProductAdd
{{ $product->product_id }}{{ $product->name }}
@endsection -------------------------------------------------------------------------------- /resources/views/sales/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') @section('content')

Export Report Details @if(isset($_SESSION['deleted']))
Success
@endif
@foreach($sales as $sale)

Customer : {{ $sale->client->name }}

Total:
Rp.{{ $sale->total }}

Date: {{ date_format($sale->created_at, 'd-M-Y') }}

View
@csrf @method('DELETE')
@endforeach
{{ $sales->links() }}
@endsection -------------------------------------------------------------------------------- /resources/views/sales/single.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app')@include('auth.pos')@section('content')@include('auth.passwords.admin')

Invoice No: {{ $sale->sale_id }}

Z-Invoice Date: {{ date_format($sale->created_at, 'd-M-Y') }}
https://mesinkasironline.web.app


Customer:
{{ $sale->client->name }} {{ $sale->client->rfc }}
Address: {{ $sale->client->address }}
Phone: {{ $sale->client->phone }}
Email: {{$sale->client->email}}
Invoice :{{$sale->sale_id}}


@include('auth.passwords.pos')@foreach($carts as $cart)@include('auth.passwords.transaction')@endforeach
KodeProductQtyPrice
{{ $cart->product_id }}{{ $cart->products[0]->name}}{{ $cart->amount }}{{ $cart->products[0]->price }}
Total:Rp.{{ $sale->total }}

Thank you

/ For invoice print just presh ctrl + P

@endsection -------------------------------------------------------------------------------- /resources/views/users/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') @section('content')
2 |
3 |

User

4 |

User Databased Management

5 | Create new user 6 |
7 |
8 |
9 |
10 |
11 |
12 |
@foreach($users as $user)
13 |
14 |
15 | 16 | 17 | 18 | 19 | 20 |
21 |
{{ $user->name }}
22 |
23 |
@csrf @method('DELETE') 24 |
25 |
26 |
27 |
@endforeach
28 |
29 |
@endsection -------------------------------------------------------------------------------- /resources/views/welcome.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') @section('content')
2 |
3 | 41 |
@endsection -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 18 | return $request->user(); 19 | }); 20 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->describe('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | name('users.index'); 25 | Route::delete('users/{user}', 'UserController@destroy')->name('users.destroy'); 26 | 27 | Route::get('/home', 'HomeController@index')->name('home'); 28 | Route::get('/data', 'DataController@index')->name('data'); 29 | Route::get('/office', 'OfficeController@index')->name('office'); 30 | 31 | Route::resource('products', 'ProductController')->middleware('auth'); 32 | 33 | Route::resource('clients', 'ClientController')->middleware('auth'); 34 | 35 | Route::resource('sales', 'SaleController') 36 | ->except(['update', 'edit']) 37 | ->middleware('auth'); 38 | 39 | Route::resource('categories', 'CategoryController') 40 | ->except(['update', 'edit', 'show']) 41 | ->middleware('auth'); 42 | 43 | Route::get('/reports/sales', 'SaleController@export')->name('reports.sales') 44 | ->middleware('auth'); 45 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/js/app.js', 'public/js') 15 | .sass('resources/sass/app.scss', 'public/css'); 16 | --------------------------------------------------------------------------------