├── .editorconfig ├── .env.example ├── .gitattributes ├── .github └── FUNDING.yml ├── .gitignore ├── .styleci.yml ├── README.md ├── Screenshot (24).png ├── Screenshot (25).png ├── Screenshot (26).png ├── Screenshot (27).png ├── app ├── Console │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── Auth │ │ │ ├── ConfirmPasswordController.php │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ ├── ResetPasswordController.php │ │ │ └── VerificationController.php │ │ ├── Controller.php │ │ └── HomeController.php │ ├── Kernel.php │ ├── Livewire │ │ ├── AdminHome.php │ │ ├── Cart.php │ │ ├── Category.php │ │ ├── CustomerHome.php │ │ ├── Options.php │ │ ├── Ordermethods.php │ │ ├── Product.php │ │ ├── Profile.php │ │ ├── Reports.php │ │ ├── Search.php │ │ └── Takeaway.php │ └── Middleware │ │ ├── Authenticate.php │ │ ├── EncryptCookies.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ └── VerifyCsrfToken.php ├── Models │ ├── Address.php │ ├── Category.php │ ├── Option.php │ ├── OrderMethod.php │ ├── Product.php │ ├── ProductTransactions.php │ ├── Search.php │ ├── Transactions.php │ └── User.php └── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cors.php ├── database.php ├── filesystems.php ├── flare.php ├── hashing.php ├── ignition.php ├── laravelpwa.php ├── laravolt │ └── indonesia.php ├── livewire.php ├── logging.php ├── mail.php ├── queue.php ├── services.php ├── session.php ├── shopping_cart.php ├── tinker.php ├── trustedproxy.php └── view.php ├── database ├── .gitignore ├── factories │ └── UserFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2016_08_03_072729_create_provinces_table.php │ ├── 2016_08_03_072750_create_cities_table.php │ ├── 2016_08_03_072804_create_districts_table.php │ ├── 2016_08_03_072819_create_villages_table.php │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ ├── 2021_02_09_002139_create_categories_table.php │ ├── 2021_02_09_002255_create_options_table.php │ ├── 2021_02_09_002350_create_order_method_table.php │ ├── 2021_02_09_002439_create_products_table.php │ ├── 2021_02_14_223718_create_transactions_table.php │ ├── 2021_02_14_223957_create_product_transactions_table.php │ └── 2021_02_17_143551_create_billing_address_table.php └── seeders │ └── DatabaseSeeder.php ├── index.php ├── logo-512x512.png ├── package-lock.json ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── css │ └── app.css ├── favicon.ico ├── images │ └── icons │ │ ├── icon-128x128.png │ │ ├── icon-144x144.png │ │ ├── icon-152x152.png │ │ ├── icon-192x192.png │ │ ├── icon-384x384.png │ │ ├── icon-512x512.png │ │ ├── icon-72x72.png │ │ ├── icon-96x96.png │ │ ├── splash-1125x2436.png │ │ ├── splash-1242x2208.png │ │ ├── splash-1242x2688.png │ │ ├── splash-1536x2048.png │ │ ├── splash-1668x2224.png │ │ ├── splash-1668x2388.png │ │ ├── splash-2048x2732.png │ │ ├── splash-640x1136.png │ │ ├── splash-750x1334.png │ │ └── splash-828x1792.png ├── index.php ├── js │ └── app.js ├── manifest.json ├── mix-manifest.json ├── offline │ └── index.html ├── robots.txt ├── serviceworker.js ├── vendor │ └── livewire │ │ ├── livewire.js │ │ ├── livewire.js.map │ │ └── manifest.json └── web.config ├── resources ├── css │ └── app.css ├── js │ ├── app.js │ └── bootstrap.js ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php ├── sass │ ├── _variables.scss │ └── app.scss └── views │ ├── auth │ ├── login.blade.php │ ├── passwords │ │ ├── confirm.blade.php │ │ ├── email.blade.php │ │ └── reset.blade.php │ ├── register.blade.php │ └── verify.blade.php │ ├── home.blade.php │ ├── layouts │ └── app.blade.php │ ├── livewire │ ├── address-create.blade.php │ ├── address-update.blade.php │ ├── admin-home.blade.php │ ├── cart.blade.php │ ├── categories.blade.php │ ├── category-create.blade.php │ ├── category-update.blade.php │ ├── customer-home.blade.php │ ├── dashboard-nav.blade.php │ ├── option-create.blade.php │ ├── option-update.blade.php │ ├── options.blade.php │ ├── ordermethod-create.blade.php │ ├── ordermethod-update.blade.php │ ├── ordermethods.blade.php │ ├── product-create.blade.php │ ├── product-delete.blade.php │ ├── product-image.blade.php │ ├── product-update.blade.php │ ├── products.blade.php │ ├── profile.blade.php │ ├── receipt.blade.php │ ├── reports.blade.php │ ├── search.blade.php │ └── takeaway.blade.php │ └── welcome.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php └── webpack.mix.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | LOG_LEVEL=debug 9 | 10 | DB_CONNECTION=mysql 11 | DB_HOST=127.0.0.1 12 | DB_PORT=3306 13 | DB_DATABASE=laravel 14 | DB_USERNAME=root 15 | DB_PASSWORD= 16 | 17 | BROADCAST_DRIVER=log 18 | CACHE_DRIVER=file 19 | QUEUE_CONNECTION=sync 20 | SESSION_DRIVER=file 21 | SESSION_LIFETIME=120 22 | 23 | MEMCACHED_HOST=127.0.0.1 24 | 25 | REDIS_HOST=127.0.0.1 26 | REDIS_PASSWORD=null 27 | REDIS_PORT=6379 28 | 29 | MAIL_MAILER=smtp 30 | MAIL_HOST=mailhog 31 | MAIL_PORT=1025 32 | MAIL_USERNAME=null 33 | MAIL_PASSWORD=null 34 | MAIL_ENCRYPTION=null 35 | MAIL_FROM_ADDRESS=null 36 | MAIL_FROM_NAME="${APP_NAME}" 37 | 38 | AWS_ACCESS_KEY_ID= 39 | AWS_SECRET_ACCESS_KEY= 40 | AWS_DEFAULT_REGION=us-east-1 41 | AWS_BUCKET= 42 | 43 | PUSHER_APP_ID= 44 | PUSHER_APP_KEY= 45 | PUSHER_APP_SECRET= 46 | PUSHER_APP_CLUSTER=mt1 47 | 48 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 49 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 50 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ['https://paypal.me/ariebj?locale.x=id_ID'] 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/storage 4 | /storage/*.key 5 | /vendor 6 | .env 7 | .env.backup 8 | .phpunit.result.cache 9 | docker-compose.override.yml 10 | Homestead.json 11 | Homestead.yaml 12 | npm-debug.log 13 | yarn-error.log 14 | .vscode 15 | database/migrations/u7935891_pos.sql 16 | -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | disabled: 4 | - no_unused_imports 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 | -------------------------------------------------------------------------------- /Screenshot (24).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/Screenshot (24).png -------------------------------------------------------------------------------- /Screenshot (25).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/Screenshot (25).png -------------------------------------------------------------------------------- /Screenshot (26).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/Screenshot (26).png -------------------------------------------------------------------------------- /Screenshot (27).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/Screenshot (27).png -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 28 | } 29 | 30 | /** 31 | * Register the commands for the application. 32 | * 33 | * @return void 34 | */ 35 | protected function commands() 36 | { 37 | $this->load(__DIR__.'/Commands'); 38 | 39 | require base_path('routes/console.php'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | reportable(function (Throwable $e) { 37 | // 38 | }); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /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('guest'); 42 | } 43 | 44 | /** 45 | * Get a validator for an incoming registration request. 46 | * 47 | * @param array $data 48 | * @return \Illuminate\Contracts\Validation\Validator 49 | */ 50 | protected function validator(array $data) 51 | { 52 | return Validator::make($data, [ 53 | 'name' => ['required', 'string', 'max:255'], 54 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 55 | 'password' => ['required', 'string', 'min:8', 'confirmed'], 56 | ]); 57 | } 58 | 59 | /** 60 | * Create a new user instance after a valid registration. 61 | * 62 | * @param array $data 63 | * @return \App\Models\User 64 | */ 65 | protected function create(array $data) 66 | { 67 | return User::create([ 68 | 'name' => $data['name'], 69 | 'email' => $data['email'], 70 | 'password' => Hash::make($data['password']), 71 | ]); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 39 | $this->middleware('signed')->only('verify'); 40 | $this->middleware('throttle:6,1')->only('verify', 'resend'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | middleware(['auth', 'verified']); 11 | } 12 | public function index() 13 | { 14 | return view('home'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 33 | \App\Http\Middleware\EncryptCookies::class, 34 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 35 | \Illuminate\Session\Middleware\StartSession::class, 36 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 37 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 38 | \App\Http\Middleware\VerifyCsrfToken::class, 39 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 40 | ], 41 | 42 | 'api' => [ 43 | 'throttle:api', 44 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 45 | ], 46 | ]; 47 | 48 | /** 49 | * The application's route middleware. 50 | * 51 | * These middleware may be assigned to groups or used individually. 52 | * 53 | * @var array 54 | */ 55 | protected $routeMiddleware = [ 56 | 'auth' => \App\Http\Middleware\Authenticate::class, 57 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::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/Livewire/AdminHome.php: -------------------------------------------------------------------------------- 1 | search . '%') 25 | ->where('status', 'LIKE', '%' . $this->search . '%') 26 | ->orderBy('id') 27 | ->paginate(10); 28 | $todayTransactions = Transactions::whereDate('created_at', $date) 29 | ->where('invoice_number', 'LIKE', '%' . $this->search . '%') 30 | ->orderBy('created_at', 'desc') 31 | ->get(); 32 | return view('livewire.admin-home', compact( 33 | 'transactions', 34 | 'todayTransactions', 35 | 'address', 36 | 'users', 37 | 'date' 38 | )); 39 | } 40 | 41 | public function updatingSearch() 42 | { 43 | $this->resetPage(); 44 | } 45 | 46 | private function resetInput() 47 | { 48 | $this->status = null; 49 | } 50 | 51 | public function updateStatusOnhold($id) 52 | { 53 | if ($id) { 54 | Transactions::where('id', $id)->update([ 55 | 'status' => 'On-Hold' 56 | ]); 57 | session()->flash('message', 'Status Transaksi On-Hold'); 58 | } 59 | } 60 | public function updateStatusCancelled($id) 61 | { 62 | if ($id) { 63 | Transactions::where('id', $id)->update([ 64 | 'status' => 'Cancelled' 65 | ]); 66 | session()->flash('message', 'Status Transaksi Cancelled'); 67 | } 68 | } 69 | public function updateStatusProcessing($id) 70 | { 71 | if ($id) { 72 | Transactions::where('id', $id)->update([ 73 | 'status' => 'Processing' 74 | ]); 75 | session()->flash('message', 'Status Transaksi Processing'); 76 | } 77 | } 78 | public function updateStatusCompleted($id) 79 | { 80 | if ($id) { 81 | Transactions::where('id', $id)->update([ 82 | 'status' => 'Completed' 83 | ]); 84 | session()->flash('message', 'Status Transaksi Completed'); 85 | } 86 | } 87 | 88 | public function deleteTransaction($id) 89 | { 90 | if ($id) { 91 | Transactions::where('id', $id)->delete(); 92 | session()->flash('message', 'Transaksi telah dihapus.'); 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /app/Http/Livewire/Category.php: -------------------------------------------------------------------------------- 1 | search . '%')->orderBy('id')->get(); 27 | return view('livewire.categories', ['categories' => $categories]); 28 | } 29 | 30 | public function updatingSearch() 31 | { 32 | $this->resetPage(); 33 | } 34 | 35 | private function resetInput() 36 | { 37 | $this->name = null; 38 | $this->image = null; 39 | $this->description = null; 40 | } 41 | 42 | public function previewImage() 43 | { 44 | $this->validate([ 45 | 'image' => 'nullable|image|max:2048' 46 | ]); 47 | } 48 | 49 | public function store() 50 | { 51 | $this->validate([ 52 | 'image' => 'nullable|image|max:2048', 53 | 'name' => 'required|string|unique:categories', 54 | 'description' => 'required' 55 | ]); 56 | $imageName = $this->image->getClientOriginalName(); 57 | 58 | Storage::putFileAs('public/uploads', $this->image, $imageName); 59 | 60 | CategoryModel::create([ 61 | 'name' => $this->name, 62 | 'image' => $imageName, 63 | 'description' => $this->description 64 | ]); 65 | session()->flash('message', 'Category Created Successfully.'); 66 | $this->dispatchBrowserEvent('categoryStore'); 67 | $this->resetInput(); 68 | return $this->redirectRoute('categories'); 69 | } 70 | 71 | public function edit($id) 72 | { 73 | $this->updateMode = true; 74 | $category = CategoryModel::where('id', $id)->first(); 75 | $this->category_id = $id; 76 | $this->name = $category->name; 77 | $this->image = $category->image; 78 | $this->description = $category->description; 79 | } 80 | public function update() 81 | { 82 | $this->validate([ 83 | 'name' => 'required|string|max:50', 84 | 'description' => 'required' 85 | ]); 86 | 87 | if ($this->category_id) { 88 | $category = CategoryModel::find($this->category_id); 89 | $category->update([ 90 | 'name' => $this->name, 91 | 'description' => $this->description, 92 | ]); 93 | $this->updateMode = false; 94 | session()->flash('message', 'Category Updated Successfully.'); 95 | $this->resetInput(); 96 | return $this->redirectRoute('categories'); 97 | } 98 | } 99 | 100 | public function updateCategoryImage() 101 | { 102 | $this->validate([ 103 | 'image' => 'nullable|image|max:2048', 104 | ]); 105 | 106 | $imageName = $this->image->getClientOriginalName(); 107 | Storage::putFileAs('public/uploads', $this->image, $imageName); 108 | 109 | if ($this->category_id) { 110 | $category = CategoryModel::find($this->category_id); 111 | $category->update([ 112 | 'image' => $imageName, 113 | ]); 114 | $this->updateMode = false; 115 | session()->flash('message', 'Image Updated Successfully.'); 116 | $this->resetInput(); 117 | return $this->redirectRoute('categories'); 118 | } 119 | } 120 | 121 | public function delete($id) 122 | { 123 | if ($id) { 124 | CategoryModel::where('id', $id)->delete(); 125 | session()->flash('message', 'Category Deleted Successfully.'); 126 | } 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /app/Http/Livewire/CustomerHome.php: -------------------------------------------------------------------------------- 1 | resetPage(); 25 | } 26 | 27 | public function clearSearch() 28 | { 29 | $this->search = ''; 30 | } 31 | 32 | public function render() 33 | { 34 | $user = Auth::id(); 35 | $transactions = Transactions::with('product')->where('user_id', $user)->where('invoice_number', 'LIKE', '%' . $this->search . '%')->orderBy('invoice_number', 'desc')->get(); 36 | return view('livewire.customer-home', compact('transactions')); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Http/Livewire/Options.php: -------------------------------------------------------------------------------- 1 | search . '%') 19 | ->orWhere('description', 'LIKE', '%' . $this->search . '%') 20 | ->orderBy('id') 21 | ->paginate(8); 22 | return view('livewire.options', compact('options')); 23 | } 24 | 25 | public function updatingSearch() 26 | { 27 | $this->resetPage(); 28 | } 29 | 30 | private function resetInput() 31 | { 32 | $this->option_id = null; 33 | $this->name = null; 34 | $this->description = null; 35 | } 36 | 37 | public function store() 38 | { 39 | $this->validate([ 40 | 'name' => 'required|string|max:255', 41 | 'description' => 'required|string|max:255', 42 | ]); 43 | 44 | Option::create([ 45 | 'name' => $this->name, 46 | 'description' => $this->description, 47 | ]); 48 | session()->flash('message', 'Option Created Successfully.'); 49 | $this->resetInput(); 50 | return $this->redirectRoute('options'); 51 | } 52 | public function edit($id) 53 | { 54 | $this->updateMode = true; 55 | $option = Option::where('id', $id)->first(); 56 | $this->option_id = $id; 57 | $this->name = $option->name; 58 | $this->description = $option->description; 59 | } 60 | public function update() 61 | { 62 | $this->validate([ 63 | 'name' => 'required|string|max:50', 64 | 'description' => 'required' 65 | ]); 66 | 67 | if ($this->option_id) { 68 | $option = Option::find($this->option_id); 69 | $option->update([ 70 | 'name' => $this->name, 71 | 'description' => $this->description, 72 | ]); 73 | $this->updateMode = false; 74 | session()->flash('message', 'Option Updated Successfully.'); 75 | $this->resetInput(); 76 | return $this->redirectRoute('options'); 77 | } 78 | } 79 | 80 | public function delete($id) 81 | { 82 | if ($id) { 83 | Option::where('id', $id)->delete(); 84 | session()->flash('message', 'Option Deleted Successfully.'); 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /app/Http/Livewire/Ordermethods.php: -------------------------------------------------------------------------------- 1 | search . '%')->orderBy('id')->paginate(8); 17 | return view('livewire.ordermethods', compact('ordermethods')); 18 | } 19 | 20 | public function updatingSearch() 21 | { 22 | $this->resetPage(); 23 | } 24 | 25 | private function resetInput() 26 | { 27 | $this->ordermethod_id = null; 28 | $this->name = null; 29 | $this->description = null; 30 | } 31 | 32 | public function store() 33 | { 34 | $this->validate([ 35 | 'name' => 'required|string|max:255|unique:order_method', 36 | 'description' => 'required|string|max:255', 37 | ]); 38 | 39 | OrderMethod::create([ 40 | 'name' => $this->name, 41 | 'description' => $this->description, 42 | ]); 43 | session()->flash('message', 'Order Method Created Successfully.'); 44 | $this->resetInput(); 45 | return $this->redirectRoute('ordermethods'); 46 | } 47 | public function edit($id) 48 | { 49 | $this->updateMode = true; 50 | $ordermethod = OrderMethod::where('id', $id)->first(); 51 | $this->ordermethod_id = $id; 52 | $this->name = $ordermethod->name; 53 | $this->description = $ordermethod->description; 54 | } 55 | public function update() 56 | { 57 | $this->validate([ 58 | 'name' => 'required|string|max:50', 59 | 'description' => 'required' 60 | ]); 61 | 62 | if ($this->ordermethod_id) { 63 | $ordermethod = OrderMethod::find($this->ordermethod_id); 64 | $ordermethod->update([ 65 | 'name' => $this->name, 66 | 'description' => $this->description, 67 | ]); 68 | $this->updateMode = false; 69 | session()->flash('message', 'Order Method Updated Successfully.'); 70 | $this->resetInput(); 71 | return $this->redirectRoute('ordermethods'); 72 | } 73 | } 74 | 75 | public function delete($id) 76 | { 77 | if ($id) { 78 | OrderMethod::where('id', $id)->delete(); 79 | session()->flash('message', 'Order Method Deleted Successfully.'); 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /app/Http/Livewire/Reports.php: -------------------------------------------------------------------------------- 1 | resetPage(); 24 | } 25 | 26 | public function clearSearchTransactions() 27 | { 28 | $this->search = ''; 29 | } 30 | 31 | private function resetInput() 32 | { 33 | $this->status = null; 34 | } 35 | 36 | public function render() 37 | { 38 | $address = Address::all(); 39 | $users = User::all(); 40 | $transactions = Transactions::with('user')->where('invoice_number', 'LIKE', '%' . $this->search . '%') 41 | ->orWhere('status', 'LIKE', '%' . $this->search . '%') 42 | ->orderBy('created_at', 'desc') 43 | ->get(); 44 | return view('livewire.reports')->with([ 45 | 'transactions' => $transactions, 46 | 'address' => $address, 47 | 'users' => $users 48 | ]); 49 | } 50 | 51 | public function updateStatusOnhold($id) 52 | { 53 | if ($id) { 54 | Transactions::where('id', $id)->update([ 55 | 'status' => 'On-Hold' 56 | ]); 57 | session()->flash('message', 'Status Transaksi On-Hold'); 58 | } 59 | } 60 | public function updateStatusCancelled($id) 61 | { 62 | if ($id) { 63 | Transactions::where('id', $id)->update([ 64 | 'status' => 'Cancelled' 65 | ]); 66 | session()->flash('message', 'Status Transaksi Cancelled'); 67 | } 68 | } 69 | public function updateStatusProcessing($id) 70 | { 71 | if ($id) { 72 | Transactions::where('id', $id)->update([ 73 | 'status' => 'Processing' 74 | ]); 75 | session()->flash('message', 'Status Transaksi Processing'); 76 | } 77 | } 78 | public function updateStatusCompleted($id) 79 | { 80 | if ($id) { 81 | Transactions::where('id', $id)->update([ 82 | 'status' => 'Completed' 83 | ]); 84 | session()->flash('message', 'Status Transaksi Completed'); 85 | } 86 | } 87 | 88 | public function deleteTransaction($id) 89 | { 90 | if ($id) { 91 | Transactions::where('id', $id)->delete(); 92 | session()->flash('message', 'Transaksi telah dihapus.'); 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /app/Http/Livewire/Search.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 26 | return redirect(RouteServiceProvider::HOME); 27 | } 28 | } 29 | 30 | return $next($request); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | belongsTo(User::class); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Models/Category.php: -------------------------------------------------------------------------------- 1 | hasMany(Product::class); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Models/Option.php: -------------------------------------------------------------------------------- 1 | hasMany(Product::class); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Models/OrderMethod.php: -------------------------------------------------------------------------------- 1 | hasMany(Product::class); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Models/Product.php: -------------------------------------------------------------------------------- 1 | belongsTo(Category::class); 17 | } 18 | public function option() 19 | { 20 | return $this->belongsTo(Option::class); 21 | } 22 | public function order_method() 23 | { 24 | return $this->belongsTo(OrderMethod::class); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Models/ProductTransactions.php: -------------------------------------------------------------------------------- 1 | belongsTo(Product::class); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Models/Search.php: -------------------------------------------------------------------------------- 1 | ', '@', '(', ')', '~']; 15 | $term = str_replace($reservedSymbols, '', $term); 16 | 17 | $words = explode(' ', $term); 18 | foreach ($words as $idx => $word) { 19 | // Add operators so we can leverage the boolean mode of 20 | // fulltext indices. 21 | $words[$idx] = "+" . $word . "*"; 22 | } 23 | $term = implode(' ', $words); 24 | return $term; 25 | } 26 | 27 | protected function scopeSearch($query, $term) 28 | { 29 | $columns = implode(',', $this->searchable); 30 | 31 | // Boolean mode allows us to match john* for words starting with john 32 | // (https://dev.mysql.com/doc/refman/5.6/en/fulltext-boolean.html) 33 | $query->whereRaw( 34 | "MATCH ({$columns}) AGAINST (? IN BOOLEAN MODE)", 35 | $this->buildWildCards($term) 36 | ); 37 | return $query; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Models/Transactions.php: -------------------------------------------------------------------------------- 1 | hasMany(ProductTransactions::class, 'invoice_number', 'invoice_number'); 20 | } 21 | 22 | public function user() 23 | { 24 | return $this->belongsTo(User::class, 'user_id'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Models/User.php: -------------------------------------------------------------------------------- 1 | 'datetime', 43 | ]; 44 | 45 | public function address() 46 | { 47 | return $this->hasOne(Address::class, 'user_id'); 48 | } 49 | public function transactions() 50 | { 51 | return $this->hasMany(Transactions::class, 'user_id'); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /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 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | configureRateLimiting(); 39 | 40 | $this->routes(function () { 41 | Route::prefix('api') 42 | ->middleware('api') 43 | ->namespace($this->namespace) 44 | ->group(base_path('routes/api.php')); 45 | 46 | Route::middleware('web') 47 | ->namespace($this->namespace) 48 | ->group(base_path('routes/web.php')); 49 | }); 50 | } 51 | 52 | /** 53 | * Configure the rate limiters for the application. 54 | * 55 | * @return void 56 | */ 57 | protected function configureRateLimiting() 58 | { 59 | RateLimiter::for('api', function (Request $request) { 60 | return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); 61 | }); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": [ 6 | "framework", 7 | "laravel" 8 | ], 9 | "license": "MIT", 10 | "require": { 11 | "php": "^7.3|^8.0", 12 | "darryldecode/cart": "^4.2", 13 | "fideloper/proxy": "^4.4", 14 | "fruitcake/laravel-cors": "^2.0", 15 | "guzzlehttp/guzzle": "^7.0.1", 16 | "haruncpi/laravel-id-generator": "^1.0", 17 | "laravel/framework": "^8.12", 18 | "laravel/tinker": "^2.5", 19 | "laravel/ui": "^3.2", 20 | "laravolt/indonesia": "^0.29.0", 21 | "livewire/livewire": "^2.3" 22 | }, 23 | "require-dev": { 24 | "facade/ignition": "^2.5", 25 | "fakerphp/faker": "^1.9.1", 26 | "laravel/sail": "^1.0.1", 27 | "mockery/mockery": "^1.4.2", 28 | "nunomaduro/collision": "^5.0", 29 | "phpunit/phpunit": "^9.3.3" 30 | }, 31 | "config": { 32 | "optimize-autoloader": true, 33 | "preferred-install": "dist", 34 | "sort-packages": true 35 | }, 36 | "extra": { 37 | "laravel": { 38 | "dont-discover": [] 39 | } 40 | }, 41 | "autoload": { 42 | "psr-4": { 43 | "App\\": "app/", 44 | "Database\\Factories\\": "database/factories/", 45 | "Database\\Seeders\\": "database/seeders/" 46 | } 47 | }, 48 | "autoload-dev": { 49 | "psr-4": { 50 | "Tests\\": "tests/" 51 | } 52 | }, 53 | "minimum-stability": "dev", 54 | "prefer-stable": true, 55 | "scripts": { 56 | "post-autoload-dump": [ 57 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 58 | "@php artisan package:discover --ansi", 59 | "@php artisan vendor:publish --force --tag=livewire:assets --ansi" 60 | ], 61 | "post-root-package-install": [ 62 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 63 | ], 64 | "post-create-project-cmd": [ 65 | "@php artisan key:generate --ansi" 66 | ] 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /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\Models\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 | 'ably' => [ 45 | 'driver' => 'ably', 46 | 'key' => env('ABLY_KEY'), 47 | ], 48 | 49 | 'redis' => [ 50 | 'driver' => 'redis', 51 | 'connection' => 'default', 52 | ], 53 | 54 | 'log' => [ 55 | 'driver' => 'log', 56 | ], 57 | 58 | 'null' => [ 59 | 'driver' => 'null', 60 | ], 61 | 62 | ], 63 | 64 | ]; 65 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | | Supported drivers: "apc", "array", "database", "file", 30 | | "memcached", "redis", "dynamodb", "null" 31 | | 32 | */ 33 | 34 | 'stores' => [ 35 | 36 | 'apc' => [ 37 | 'driver' => 'apc', 38 | ], 39 | 40 | 'array' => [ 41 | 'driver' => 'array', 42 | 'serialize' => false, 43 | ], 44 | 45 | 'database' => [ 46 | 'driver' => 'database', 47 | 'table' => 'cache', 48 | 'connection' => null, 49 | 'lock_connection' => null, 50 | ], 51 | 52 | 'file' => [ 53 | 'driver' => 'file', 54 | 'path' => storage_path('framework/cache/data'), 55 | ], 56 | 57 | 'memcached' => [ 58 | 'driver' => 'memcached', 59 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 60 | 'sasl' => [ 61 | env('MEMCACHED_USERNAME'), 62 | env('MEMCACHED_PASSWORD'), 63 | ], 64 | 'options' => [ 65 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 66 | ], 67 | 'servers' => [ 68 | [ 69 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 70 | 'port' => env('MEMCACHED_PORT', 11211), 71 | 'weight' => 100, 72 | ], 73 | ], 74 | ], 75 | 76 | 'redis' => [ 77 | 'driver' => 'redis', 78 | 'connection' => 'cache', 79 | 'lock_connection' => 'default', 80 | ], 81 | 82 | 'dynamodb' => [ 83 | 'driver' => 'dynamodb', 84 | 'key' => env('AWS_ACCESS_KEY_ID'), 85 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 86 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 87 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 88 | 'endpoint' => env('DYNAMODB_ENDPOINT'), 89 | ], 90 | 91 | ], 92 | 93 | /* 94 | |-------------------------------------------------------------------------- 95 | | Cache Key Prefix 96 | |-------------------------------------------------------------------------- 97 | | 98 | | When utilizing a RAM based store such as APC or Memcached, there might 99 | | be other applications utilizing the same cache. So, we'll specify a 100 | | value to get prefixed to all our keys so we can avoid collisions. 101 | | 102 | */ 103 | 104 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), 105 | 106 | ]; 107 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*', 'sanctum/csrf-cookie'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Filesystem Disks 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure as many filesystem "disks" as you wish, and you 24 | | may even configure multiple disks of the same driver. Defaults have 25 | | been setup for each driver as an example of the required options. 26 | | 27 | | Supported Drivers: "local", "ftp", "sftp", "s3" 28 | | 29 | */ 30 | 31 | 'disks' => [ 32 | 33 | 'local' => [ 34 | 'driver' => 'local', 35 | 'root' => storage_path('app'), 36 | ], 37 | 38 | 'public' => [ 39 | 'driver' => 'local', 40 | 'root' => storage_path('app/public'), 41 | 'url' => env('APP_URL') . '/storage', 42 | 'visibility' => 'public', 43 | ], 44 | 45 | 's3' => [ 46 | 'driver' => 's3', 47 | 'key' => env('AWS_ACCESS_KEY_ID'), 48 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 49 | 'region' => env('AWS_DEFAULT_REGION'), 50 | 'bucket' => env('AWS_BUCKET'), 51 | 'url' => env('AWS_URL'), 52 | 'endpoint' => env('AWS_ENDPOINT'), 53 | ], 54 | 55 | ], 56 | 57 | /* 58 | |-------------------------------------------------------------------------- 59 | | Symbolic Links 60 | |-------------------------------------------------------------------------- 61 | | 62 | | Here you may configure the symbolic links that will be created when the 63 | | `storage:link` Artisan command is executed. The array keys should be 64 | | the locations of the links and the values should be their targets. 65 | | 66 | */ 67 | 68 | 'links' => [ 69 | public_path('/storage') => storage_path('app/public'), 70 | ], 71 | 72 | ]; 73 | -------------------------------------------------------------------------------- /config/flare.php: -------------------------------------------------------------------------------- 1 | env('FLARE_KEY'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Reporting Options 21 | |-------------------------------------------------------------------------- 22 | | 23 | | These options determine which information will be transmitted to Flare. 24 | | 25 | */ 26 | 27 | 'reporting' => [ 28 | 'anonymize_ips' => true, 29 | 'collect_git_information' => false, 30 | 'report_queries' => true, 31 | 'maximum_number_of_collected_queries' => 200, 32 | 'report_query_bindings' => true, 33 | 'report_view_data' => true, 34 | 'grouping_type' => null, 35 | 'report_logs' => true, 36 | 'maximum_number_of_collected_logs' => 200, 37 | ], 38 | 39 | /* 40 | |-------------------------------------------------------------------------- 41 | | Reporting Log statements 42 | |-------------------------------------------------------------------------- 43 | | 44 | | If this setting is `false` log statements won't be send as events to Flare, 45 | | no matter which error level you specified in the Flare log channel. 46 | | 47 | */ 48 | 49 | 'send_logs_as_events' => true, 50 | ]; 51 | -------------------------------------------------------------------------------- /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/ignition.php: -------------------------------------------------------------------------------- 1 | env('IGNITION_EDITOR', 'phpstorm'), 18 | 19 | /* 20 | |-------------------------------------------------------------------------- 21 | | Theme 22 | |-------------------------------------------------------------------------- 23 | | 24 | | Here you may specify which theme Ignition should use. 25 | | 26 | | Supported: "light", "dark", "auto" 27 | | 28 | */ 29 | 30 | 'theme' => env('IGNITION_THEME', 'light'), 31 | 32 | /* 33 | |-------------------------------------------------------------------------- 34 | | Sharing 35 | |-------------------------------------------------------------------------- 36 | | 37 | | You can share local errors with colleagues or others around the world. 38 | | Sharing is completely free and doesn't require an account on Flare. 39 | | 40 | | If necessary, you can completely disable sharing below. 41 | | 42 | */ 43 | 44 | 'enable_share_button' => env('IGNITION_SHARING_ENABLED', true), 45 | 46 | /* 47 | |-------------------------------------------------------------------------- 48 | | Register Ignition commands 49 | |-------------------------------------------------------------------------- 50 | | 51 | | Ignition comes with an additional make command that lets you create 52 | | new solution classes more easily. To keep your default Laravel 53 | | installation clean, this command is not registered by default. 54 | | 55 | | You can enable the command registration below. 56 | | 57 | */ 58 | 'register_commands' => env('REGISTER_IGNITION_COMMANDS', false), 59 | 60 | /* 61 | |-------------------------------------------------------------------------- 62 | | Ignored Solution Providers 63 | |-------------------------------------------------------------------------- 64 | | 65 | | You may specify a list of solution providers (as fully qualified class 66 | | names) that shouldn't be loaded. Ignition will ignore these classes 67 | | and possible solutions provided by them will never be displayed. 68 | | 69 | */ 70 | 71 | 'ignored_solution_providers' => [ 72 | \Facade\Ignition\SolutionProviders\MissingPackageSolutionProvider::class, 73 | ], 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Runnable Solutions 78 | |-------------------------------------------------------------------------- 79 | | 80 | | Some solutions that Ignition displays are runnable and can perform 81 | | various tasks. Runnable solutions are enabled when your app has 82 | | debug mode enabled. You may also fully disable this feature. 83 | | 84 | */ 85 | 86 | 'enable_runnable_solutions' => env('IGNITION_ENABLE_RUNNABLE_SOLUTIONS', null), 87 | 88 | /* 89 | |-------------------------------------------------------------------------- 90 | | Remote Path Mapping 91 | |-------------------------------------------------------------------------- 92 | | 93 | | If you are using a remote dev server, like Laravel Homestead, Docker, or 94 | | even a remote VPS, it will be necessary to specify your path mapping. 95 | | 96 | | Leaving one, or both of these, empty or null will not trigger the remote 97 | | URL changes and Ignition will treat your editor links as local files. 98 | | 99 | | "remote_sites_path" is an absolute base path for your sites or projects 100 | | in Homestead, Vagrant, Docker, or another remote development server. 101 | | 102 | | Example value: "/home/vagrant/Code" 103 | | 104 | | "local_sites_path" is an absolute base path for your sites or projects 105 | | on your local computer where your IDE or code editor is running on. 106 | | 107 | | Example values: "/Users//Code", "C:\Users\\Documents\Code" 108 | | 109 | */ 110 | 111 | 'remote_sites_path' => env('IGNITION_REMOTE_SITES_PATH', ''), 112 | 'local_sites_path' => env('IGNITION_LOCAL_SITES_PATH', ''), 113 | 114 | /* 115 | |-------------------------------------------------------------------------- 116 | | Housekeeping Endpoint Prefix 117 | |-------------------------------------------------------------------------- 118 | | 119 | | Ignition registers a couple of routes when it is enabled. Below you may 120 | | specify a route prefix that will be used to host all internal links. 121 | | 122 | */ 123 | 'housekeeping_endpoint_prefix' => '_ignition', 124 | 125 | ]; 126 | -------------------------------------------------------------------------------- /config/laravelpwa.php: -------------------------------------------------------------------------------- 1 | 'ROAKPOS', 5 | 'manifest' => [ 6 | 'name' => env('APP_NAME'), 7 | 'short_name' => 'ROAKPOS', 8 | 'start_url' => '/roakpos/public', 9 | 'background_color' => '#ffffff', 10 | 'theme_color' => '#000000', 11 | 'display' => 'standalone', 12 | 'orientation' => 'any', 13 | 'status_bar' => 'black', 14 | 'icons' => [ 15 | '72x72' => [ 16 | 'path' => '/roakpos/public/storage/logos/logo-72x72.png', 17 | 'purpose' => 'any' 18 | ], 19 | '96x96' => [ 20 | 'path' => '/roakpos/public/storage/logos/logo-96x96.png', 21 | 'purpose' => 'any' 22 | ], 23 | '128x128' => [ 24 | 'path' => '/roakpos/public/storage/logos/logo-128x128.png', 25 | 'purpose' => 'any' 26 | ], 27 | '144x144' => [ 28 | 'path' => '/roakpos/public/storage/logos/logo-144x144.png', 29 | 'purpose' => 'any' 30 | ], 31 | '152x152' => [ 32 | 'path' => '/roakpos/public/roakpos/public/storage/logos/logo-152x152.png', 33 | 'purpose' => 'any' 34 | ], 35 | '192x192' => [ 36 | 'path' => '/roakpos/public/storage/logos/logo-192x192.png', 37 | 'purpose' => 'any' 38 | ], 39 | '384x384' => [ 40 | 'path' => '/roakpos/public/storage/logos/logo-384x384.png', 41 | 'purpose' => 'any' 42 | ], 43 | '512x512' => [ 44 | 'path' => '/roakpos/public/storage/logos/logo-512x512.png', 45 | 'purpose' => 'any' 46 | ], 47 | ], 48 | 'splash' => [ 49 | '640x1136' => '/roakpos/public/storage/logos/splash-640x1136.png', 50 | '750x1334' => '/roakpos/public/storage/logos/splash-750x1334.png', 51 | '828x1792' => '/roakpos/public/storage/logos/splash-828x1792.png', 52 | '1125x2436' => '/roakpos/public/storage/logos/splash-1125x2436.png', 53 | '1242x2208' => '/roakpos/public/storage/logos/splash-1242x2208.png', 54 | '1242x2688' => '/roakpos/public/storage/logos/splash-1242x2688.png', 55 | '1536x2048' => '/roakpos/public/storage/logos/splash-1536x2048.png', 56 | '1668x2224' => '/roakpos/public/storage/logos/splash-1668x2224.png', 57 | '1668x2388' => '/roakpos/public/storage/logos/splash-1668x2388.png', 58 | '2048x2732' => '/roakpos/public/storage/logos/splash-2048x2732.png', 59 | ], 60 | 'shortcuts' => [ 61 | [ 62 | 'name' => 'Shortcut Link 1', 63 | 'description' => 'ROAKPOS shortcut 1 icon', 64 | 'url' => '/roakpos/public/storage/logos/logo-72x72.png', 65 | 'icons' => [ 66 | "src" => "/roakpos/public/storage/logos/logo-72x72.png", 67 | "purpose" => "any" 68 | ] 69 | ], 70 | [ 71 | 'name' => 'Shortcut Link 2', 72 | 'description' => 'ROAKPOS shortcut 1 icon', 73 | 'url' => '/roakpos/public/storage/logos/logo-96x96.png' 74 | ] 75 | ], 76 | 'custom' => [] 77 | ] 78 | ]; 79 | -------------------------------------------------------------------------------- /config/laravolt/indonesia.php: -------------------------------------------------------------------------------- 1 | 'indonesia_', 5 | 'route' => [ 6 | 'enabled' => false, 7 | 'middleware' => ['web', 'auth'], 8 | 'prefix' => 'indonesia', 9 | ], 10 | 'view' => [ 11 | 'layout' => 'ui::layouts.app', 12 | ], 13 | 'menu' => [ 14 | 'enabled' => false, 15 | ], 16 | ]; 17 | -------------------------------------------------------------------------------- /config/livewire.php: -------------------------------------------------------------------------------- 1 | 'App\\Http\\Livewire', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This value sets the path for Livewire component views. This affects 26 | | file manipulation helper commands like `artisan make:livewire`. 27 | | 28 | */ 29 | 30 | 'view_path' => resource_path('views/livewire'), 31 | 32 | /* 33 | |-------------------------------------------------------------------------- 34 | | Layout 35 | |-------------------------------------------------------------------------- 36 | | The default layout view that will be used when rendering a component via 37 | | Route::get('/some-endpoint', SomeComponent::class);. In this case the 38 | | the view returned by SomeComponent will be wrapped in "layouts.app" 39 | | 40 | */ 41 | 'layout' => 'layouts.app', 42 | 43 | /* 44 | |-------------------------------------------------------------------------- 45 | | Livewire Assets URL 46 | |-------------------------------------------------------------------------- 47 | | 48 | | This value sets the path to Livewire JavaScript assets, for cases where 49 | | your app's domain root is not the correct path. By default, Livewire 50 | | will load its JavaScript assets from the app's "relative root". 51 | | 52 | | Examples: "/assets", "myurl.com/app". 53 | | 54 | */ 55 | 56 | 'asset_url' => '/roakpos/public', 57 | 58 | /* 59 | |-------------------------------------------------------------------------- 60 | | Livewire Endpoint Middleware Group 61 | |-------------------------------------------------------------------------- 62 | | 63 | | This value sets the middleware group that will be applied to the main 64 | | Livewire "message" endpoint (the endpoint that gets hit everytime 65 | | a Livewire component updates). It is set to "web" by default. 66 | | 67 | */ 68 | 69 | 'middleware_group' => 'web', 70 | 71 | /* 72 | |-------------------------------------------------------------------------- 73 | | Livewire Temporary File Uploads Endpoint Configuration 74 | |-------------------------------------------------------------------------- 75 | | 76 | | Livewire handles file uploads by storing uploads in a temporary directory 77 | | before the file is validated and stored permanently. All file uploads 78 | | are directed to a global endpoint for temporary storage. The config 79 | | items below are used for customizing the way the endpoint works. 80 | | 81 | */ 82 | 83 | 'temporary_file_upload' => [ 84 | 'disk' => null, // Example: 'local', 's3' Default: 'default' 85 | 'rules' => null, // Example: ['file', 'mimes:png,jpg'] Default: ['required', 'file', 'max:12288'] (12MB) 86 | 'directory' => 'public/uploads', // Example: 'tmp' Default 'livewire-tmp' 87 | 'middleware' => null, // Example: 'throttle:5,1' Default: 'throttle:60,1' 88 | 'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs. 89 | 'png', 'gif', 'bmp', 'svg', 'wav', 'mp4', 90 | 'mov', 'avi', 'wmv', 'mp3', 'm4a', 91 | 'jpg', 'jpeg', 'mpga', 'webp', 'wma', 92 | ], 93 | 'max_upload_time' => 5, // Max duration (in minutes) before an upload gets invalidated. 94 | ], 95 | 96 | /* 97 | |-------------------------------------------------------------------------- 98 | | Manifest File Path 99 | |-------------------------------------------------------------------------- 100 | | 101 | | This value sets the path to the Livewire manifest file. 102 | | The default should work for most cases (which is 103 | | "/bootstrap/cache/livewire-components.php)", but for specific 104 | | cases like when hosting on Laravel Vapor, it could be set to a different value. 105 | | 106 | | Example: for Laravel Vapor, it would be "/tmp/storage/bootstrap/cache/livewire-components.php". 107 | | 108 | */ 109 | 110 | 'manifest_path' => null, 111 | 112 | ]; 113 | -------------------------------------------------------------------------------- /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' => env('LOG_LEVEL', 'debug'), 48 | ], 49 | 50 | 'daily' => [ 51 | 'driver' => 'daily', 52 | 'path' => storage_path('logs/laravel.log'), 53 | 'level' => env('LOG_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' => env('LOG_LEVEL', 'critical'), 63 | ], 64 | 65 | 'papertrail' => [ 66 | 'driver' => 'monolog', 67 | 'level' => env('LOG_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' => env('LOG_LEVEL', 'debug'), 87 | ], 88 | 89 | 'errorlog' => [ 90 | 'driver' => 'errorlog', 91 | 'level' => env('LOG_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 | 'auth_mode' => null, 46 | ], 47 | 48 | 'ses' => [ 49 | 'transport' => 'ses', 50 | ], 51 | 52 | 'mailgun' => [ 53 | 'transport' => 'mailgun', 54 | ], 55 | 56 | 'postmark' => [ 57 | 'transport' => 'postmark', 58 | ], 59 | 60 | 'sendmail' => [ 61 | 'transport' => 'sendmail', 62 | 'path' => '/usr/sbin/sendmail -bs', 63 | ], 64 | 65 | 'log' => [ 66 | 'transport' => 'log', 67 | 'channel' => env('MAIL_LOG_CHANNEL'), 68 | ], 69 | 70 | 'array' => [ 71 | 'transport' => 'array', 72 | ], 73 | ], 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Global "From" Address 78 | |-------------------------------------------------------------------------- 79 | | 80 | | You may wish for all e-mails sent by your application to be sent from 81 | | the same address. Here, you may specify a name and address that is 82 | | used globally for all e-mails that are sent by your application. 83 | | 84 | */ 85 | 86 | 'from' => [ 87 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 88 | 'name' => env('MAIL_FROM_NAME', 'Example'), 89 | ], 90 | 91 | /* 92 | |-------------------------------------------------------------------------- 93 | | Markdown Mail Settings 94 | |-------------------------------------------------------------------------- 95 | | 96 | | If you are using Markdown based email rendering, you may configure your 97 | | theme and component paths here, allowing you to customize the design 98 | | of the emails. Or, you may simply stick with the Laravel defaults! 99 | | 100 | */ 101 | 102 | 'markdown' => [ 103 | 'theme' => 'default', 104 | 105 | 'paths' => [ 106 | resource_path('views/vendor/mail'), 107 | ], 108 | ], 109 | 110 | ]; 111 | -------------------------------------------------------------------------------- /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-uuids'), 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/shopping_cart.php: -------------------------------------------------------------------------------- 1 | env('SHOPPING_FORMAT_VALUES', false), 12 | 13 | 'decimals' => env('SHOPPING_DECIMALS', 0), 14 | 15 | 'dec_point' => env('SHOPPING_DEC_POINT', '.'), 16 | 17 | 'thousands_sep' => env('SHOPPING_THOUSANDS_SEP', ','), 18 | 19 | /* 20 | * --------------------------------------------------------------- 21 | * persistence 22 | * --------------------------------------------------------------- 23 | * 24 | * the configuration for persisting cart 25 | */ 26 | 'storage' => null, 27 | 28 | /* 29 | * --------------------------------------------------------------- 30 | * events 31 | * --------------------------------------------------------------- 32 | * 33 | * the configuration for cart events 34 | */ 35 | 'events' => null, 36 | ]; -------------------------------------------------------------------------------- /config/tinker.php: -------------------------------------------------------------------------------- 1 | [ 17 | // App\Console\Commands\ExampleCommand::class, 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Auto Aliased Classes 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Tinker will not automatically alias classes in your vendor namespaces 26 | | but you may explicitly allow a subset of classes to get aliased by 27 | | adding the names of each of those classes to the following list. 28 | | 29 | */ 30 | 31 | 'alias' => [ 32 | // 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Classes That Should Not Be Aliased 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Typically, Tinker automatically aliases classes as you require them in 41 | | Tinker. However, you may wish to never alias certain classes, which 42 | | you may accomplish by listing the classes in the following array. 43 | | 44 | */ 45 | 46 | 'dont_alias' => [ 47 | 'App\Nova', 48 | ], 49 | 50 | ]; 51 | -------------------------------------------------------------------------------- /config/trustedproxy.php: -------------------------------------------------------------------------------- 1 | null, // [,], '*', ',' 19 | 20 | /* 21 | * To trust one or more specific proxies that connect 22 | * directly to your server, use an array or a string separated by comma of IP addresses: 23 | */ 24 | // 'proxies' => ['192.168.1.1'], 25 | // 'proxies' => '192.168.1.1, 192.168.1.2', 26 | 27 | /* 28 | * Or, to trust all proxies that connect 29 | * directly to your server, use a "*" 30 | */ 31 | // 'proxies' => '*', 32 | 33 | /* 34 | * Which headers to use to detect proxy related data (For, Host, Proto, Port) 35 | * 36 | * Options include: 37 | * 38 | * - Illuminate\Http\Request::HEADER_X_FORWARDED_ALL (use all x-forwarded-* headers to establish trust) 39 | * - Illuminate\Http\Request::HEADER_FORWARDED (use the FORWARDED header to establish trust) 40 | * - Illuminate\Http\Request::HEADER_X_FORWARDED_AWS_ELB (If you are using AWS Elastic Load Balancer) 41 | * 42 | * - 'HEADER_X_FORWARDED_ALL' (use all x-forwarded-* headers to establish trust) 43 | * - 'HEADER_FORWARDED' (use the FORWARDED header to establish trust) 44 | * - 'HEADER_X_FORWARDED_AWS_ELB' (If you are using AWS Elastic Load Balancer) 45 | * 46 | * @link https://symfony.com/doc/current/deployment/proxies.html 47 | */ 48 | 'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL, 49 | 50 | ]; 51 | -------------------------------------------------------------------------------- /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/UserFactory.php: -------------------------------------------------------------------------------- 1 | $this->faker->name, 27 | 'email' => $this->faker->unique()->safeEmail, 28 | 'email_verified_at' => now(), 29 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 30 | 'remember_token' => Str::random(10), 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->string('avatar')->nullable()->default(NULL); 20 | $table->set('role', ['admin', 'kasir', 'customer'])->default('customer'); 21 | $table->string('email')->unique(); 22 | $table->timestamp('email_verified_at')->nullable(); 23 | $table->string('password'); 24 | $table->rememberToken(); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('users'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2016_08_03_072729_create_provinces_table.php: -------------------------------------------------------------------------------- 1 | char('id', 2); 18 | $table->string('name', 255); 19 | $table->text('meta')->nullable(); 20 | $table->primary('id'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop(config('laravolt.indonesia.table_prefix').'provinces'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2016_08_03_072750_create_cities_table.php: -------------------------------------------------------------------------------- 1 | char('id', 4); 18 | $table->char('province_id', 2); 19 | $table->string('name', 255); 20 | $table->text('meta')->nullable(); 21 | $table->primary('id'); 22 | $table->timestamps(); 23 | 24 | $table->foreign('province_id') 25 | ->references('id') 26 | ->on(config('laravolt.indonesia.table_prefix').'provinces') 27 | ->onUpdate('cascade')->onDelete('restrict'); 28 | }); 29 | } 30 | 31 | /** 32 | * Reverse the migrations. 33 | * 34 | * @return void 35 | */ 36 | public function down() 37 | { 38 | Schema::drop(config('laravolt.indonesia.table_prefix').'cities'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /database/migrations/2016_08_03_072804_create_districts_table.php: -------------------------------------------------------------------------------- 1 | char('id', 7); 18 | $table->char('city_id', 4); 19 | $table->string('name', 255); 20 | $table->text('meta')->nullable(); 21 | $table->primary('id'); 22 | $table->timestamps(); 23 | 24 | $table->foreign('city_id') 25 | ->references('id') 26 | ->on(config('laravolt.indonesia.table_prefix').'cities') 27 | ->onUpdate('cascade')->onDelete('restrict'); 28 | }); 29 | } 30 | 31 | /** 32 | * Reverse the migrations. 33 | * 34 | * @return void 35 | */ 36 | public function down() 37 | { 38 | Schema::drop(config('laravolt.indonesia.table_prefix').'districts'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /database/migrations/2016_08_03_072819_create_villages_table.php: -------------------------------------------------------------------------------- 1 | char('id', 10); 18 | $table->char('district_id', 7); 19 | $table->string('name', 255); 20 | $table->text('meta')->nullable(); 21 | $table->primary('id'); 22 | $table->timestamps(); 23 | 24 | $table->foreign('district_id') 25 | ->references('id') 26 | ->on(config('laravolt.indonesia.table_prefix').'districts') 27 | ->onUpdate('cascade')->onDelete('restrict'); 28 | }); 29 | } 30 | 31 | /** 32 | * Reverse the migrations. 33 | * 34 | * @return void 35 | */ 36 | public function down() 37 | { 38 | Schema::drop(config('laravolt.indonesia.table_prefix').'villages'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /database/migrations/2019_08_19_000000_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('uuid')->unique(); 19 | $table->text('connection'); 20 | $table->text('queue'); 21 | $table->longText('payload'); 22 | $table->longText('exception'); 23 | $table->timestamp('failed_at')->useCurrent(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('failed_jobs'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2021_02_09_002139_create_categories_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name')->index('category_name'); 19 | $table->string('image'); 20 | $table->text('description'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::dropIfExists('categories'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2021_02_09_002255_create_options_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name')->index('option_name'); 19 | $table->string('description'); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('options'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2021_02_09_002350_create_order_method_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name')->index('product_order_method'); 19 | $table->string('description'); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('order_method'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2021_02_09_002439_create_products_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->string('category')->nullable(); 20 | $table->foreign('category') 21 | ->references('name') 22 | ->on('categories') 23 | ->onDelete('set null') 24 | ->onUpdate('cascade'); 25 | $table->string('option')->nullable(); 26 | $table->foreign('option') 27 | ->references('name') 28 | ->on('options') 29 | ->onDelete('set null') 30 | ->onUpdate('cascade'); 31 | $table->string('order_method')->nullable(); 32 | $table->foreign('order_method') 33 | ->references('name') 34 | ->on('order_method') 35 | ->onDelete('set null') 36 | ->onUpdate('cascade'); 37 | $table->string('image'); 38 | $table->text('description'); 39 | $table->string('status'); 40 | $table->integer('stock'); 41 | $table->integer('price'); 42 | $table->timestamps(); 43 | }); 44 | } 45 | 46 | /** 47 | * Reverse the migrations. 48 | * 49 | * @return void 50 | */ 51 | public function down() 52 | { 53 | Schema::dropIfExists('products'); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /database/migrations/2021_02_14_223718_create_transactions_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('invoice_number'); 19 | $table->bigInteger('user_id')->unsigned(); 20 | $table->integer('pay'); 21 | $table->integer('total'); 22 | $table->set('status', ['Pending', 'On-Hold', 'Cancelled', 'Processing', 'Completed'])->default('Pending'); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('transactions'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2021_02_14_223957_create_product_transactions_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->bigInteger('product_id')->unsigned(); 19 | $table->string('product_name'); 20 | $table->string('product_price'); 21 | $table->string('product_option'); 22 | $table->string('order_method'); 23 | $table->string('invoice_number'); 24 | $table->bigInteger('qty')->unsigned(); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('product_transactions'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2021_02_17_143551_create_billing_address_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->bigInteger('user_id')->unsigned(); 19 | $table->string('nama_depan'); 20 | $table->string('nama_belakang'); 21 | $table->string('alamat_1'); 22 | $table->string('alamat_2'); 23 | $table->string('kelurahan', 100); 24 | $table->string('kecamatan', 100); 25 | $table->string('kabupaten', 100); 26 | $table->string('provinsi', 100); 27 | $table->string('kode_pos', 5); 28 | $table->timestamps(); 29 | }); 30 | } 31 | 32 | /** 33 | * Reverse the migrations. 34 | * 35 | * @return void 36 | */ 37 | public function down() 38 | { 39 | Schema::dropIfExists('billing_address'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | ./tests/Unit 10 | 11 | 12 | ./tests/Feature 13 | 14 | 15 | 16 | 17 | ./app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | RewriteCond %{HTTPS} off 8 | RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] 9 | 10 | # Handle Authorization Header 11 | RewriteCond %{HTTP:Authorization} . 12 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 13 | 14 | # Redirect Trailing Slashes If Not A Folder... 15 | RewriteCond %{REQUEST_FILENAME} !-d 16 | RewriteCond %{REQUEST_URI} (.+)/$ 17 | RewriteRule ^ %1 [L,R=301] 18 | 19 | # Send Requests To Front Controller... 20 | RewriteCond %{REQUEST_FILENAME} !-d 21 | RewriteCond %{REQUEST_FILENAME} !-f 22 | RewriteRule ^ index.php [L] 23 | 24 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/favicon.ico -------------------------------------------------------------------------------- /public/images/icons/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/images/icons/icon-128x128.png -------------------------------------------------------------------------------- /public/images/icons/icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/images/icons/icon-144x144.png -------------------------------------------------------------------------------- /public/images/icons/icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/images/icons/icon-152x152.png -------------------------------------------------------------------------------- /public/images/icons/icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/images/icons/icon-192x192.png -------------------------------------------------------------------------------- /public/images/icons/icon-384x384.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/images/icons/icon-384x384.png -------------------------------------------------------------------------------- /public/images/icons/icon-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/images/icons/icon-512x512.png -------------------------------------------------------------------------------- /public/images/icons/icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/images/icons/icon-72x72.png -------------------------------------------------------------------------------- /public/images/icons/icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/images/icons/icon-96x96.png -------------------------------------------------------------------------------- /public/images/icons/splash-1125x2436.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/images/icons/splash-1125x2436.png -------------------------------------------------------------------------------- /public/images/icons/splash-1242x2208.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/images/icons/splash-1242x2208.png -------------------------------------------------------------------------------- /public/images/icons/splash-1242x2688.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/images/icons/splash-1242x2688.png -------------------------------------------------------------------------------- /public/images/icons/splash-1536x2048.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/images/icons/splash-1536x2048.png -------------------------------------------------------------------------------- /public/images/icons/splash-1668x2224.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/images/icons/splash-1668x2224.png -------------------------------------------------------------------------------- /public/images/icons/splash-1668x2388.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/images/icons/splash-1668x2388.png -------------------------------------------------------------------------------- /public/images/icons/splash-2048x2732.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/images/icons/splash-2048x2732.png -------------------------------------------------------------------------------- /public/images/icons/splash-640x1136.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/images/icons/splash-640x1136.png -------------------------------------------------------------------------------- /public/images/icons/splash-750x1334.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/images/icons/splash-750x1334.png -------------------------------------------------------------------------------- /public/images/icons/splash-828x1792.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/public/images/icons/splash-828x1792.png -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class); 50 | 51 | $response = tap($kernel->handle( 52 | $request = Request::capture() 53 | ))->send(); 54 | 55 | $kernel->terminate($request, $response); 56 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ROAKPOS", 3 | "short_name": "ROAKPOS", 4 | "description": "Point Of Sales", 5 | "background_color": "#ffffff", 6 | "theme_color": "#3c280d", 7 | "display": "standalone", 8 | "orientation": "any", 9 | "start_url": "https://pos.roakrak.co.id/roakpos/public/", 10 | "scope": "https://pos.roakrak.co.id/roakpos/public/", 11 | "icons": [ 12 | { 13 | "src": "/roakpos/public/storage/logos/logo-72x72.png", 14 | "sizes": "72x72", 15 | "type": "image/png", 16 | "purpose": "any maskable" 17 | }, 18 | { 19 | "src": "/roakpos/public/storage/logos/logo-96x96.png", 20 | "sizes": "96x96", 21 | "type": "image/png", 22 | "purpose": "any maskable" 23 | }, 24 | { 25 | "src": "/roakpos/public/storage/logos/logo-128x128.png", 26 | "sizes": "144x144", 27 | "type": "image/png", 28 | "purpose": "any maskable" 29 | }, 30 | { 31 | "src": "/roakpos/public/storage/logos/logo-144x144.png", 32 | "sizes": "144x144", 33 | "type": "image/png", 34 | "purpose": "any maskable" 35 | }, 36 | { 37 | "src": "/roakpos/public/storage/logos/logo-152x152.png", 38 | "sizes": "152x152", 39 | "type": "image/png", 40 | "purpose": "any maskable" 41 | }, 42 | { 43 | "src": "/roakpos/public/storage/logos/logo-192x192.png", 44 | "sizes": "192x192", 45 | "type": "image/png", 46 | "purpose": "any maskable" 47 | }, 48 | { 49 | "src": "/roakpos/public/storage/logos/logo-384x384.png", 50 | "sizes": "384x384", 51 | "type": "image/png", 52 | "purpose": "any maskable" 53 | }, 54 | { 55 | "src": "/roakpos/public/storage/logos/logo-512x512.png", 56 | "sizes": "512x512", 57 | "type": "image/png" 58 | } 59 | ], 60 | "splash": [ 61 | { 62 | "src": "/roakpos/public/storage/logos/splash-640x1136.png", 63 | "sizes": "640x1136", 64 | "type": "image/png", 65 | "purpose": "any maskable" 66 | }, 67 | { 68 | "src": "/roakpos/public/storage/logos/splash-750x1334.png", 69 | "sizes": "750x1134", 70 | "type": "image/png", 71 | "purpose": "any maskable" 72 | }, 73 | { 74 | "src": "/roakpos/public/storage/logos/splash-828x1792.png", 75 | "sizes": "828x1792", 76 | "type": "image/png", 77 | "purpose": "any maskable" 78 | }, 79 | { 80 | "src": "/roakpos/public/storage/logos/splash-1125x2436.png", 81 | "sizes": "1125x2436", 82 | "type": "image/png", 83 | "purpose": "any maskable" 84 | }, 85 | { 86 | "src": "/roakpos/public/storage/logos/splash-1242x2208.png", 87 | "sizes": "1242x2208", 88 | "type": "image/png", 89 | "purpose": "any maskable" 90 | }, 91 | { 92 | "src": "/roakpos/public/storage/logos/splash-1242x2688.png", 93 | "sizes": "1242x2688", 94 | "type": "image/png", 95 | "purpose": "any maskable" 96 | }, 97 | { 98 | "src": "/roakpos/public/storage/logos/splash-1536x2048.png", 99 | "sizes": "1536x2048", 100 | "type": "image/png", 101 | "purpose": "any maskable" 102 | }, 103 | { 104 | "src": "/roakpos/public/storage/logos/splash-1668x2224.png", 105 | "sizes": "1668x2224", 106 | "type": "image/png" 107 | }, 108 | { 109 | "src": "/roakpos/public/storage/logos/splash-1668x2388.png", 110 | "sizes": "1668x2388", 111 | "type": "image/png" 112 | }, 113 | { 114 | "src": "/roakpos/public/storage/logos/splash-1668x2224.png", 115 | "sizes": "2048x2732", 116 | "type": "image/png" 117 | } 118 | ], 119 | "/js/app.js": "/js/app.js", 120 | "/css/app.css": "/css/app.css" 121 | } 122 | -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/app.js": "/js/app.js", 3 | "/css/app.css": "/css/app.css" 4 | } 5 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/serviceworker.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | /** 4 | * Service Worker of ROAKPOS 5 | */ 6 | 7 | const cacheName = "roakpos-v1.0"; 8 | const startPage = "https://pos.roakrak.co.id/roakpos/public/"; 9 | const offlinePage = "https://pos.roakrak.co.id/roakpos/public/offline/"; 10 | const filesToCache = [startPage, offlinePage]; 11 | const neverCacheUrls = [/\/vendor/, /preview=true/]; 12 | 13 | // Install 14 | self.addEventListener("install", function (e) { 15 | console.log("ROAKPOS service worker installation"); 16 | e.waitUntil( 17 | caches.open(cacheName).then(function (cache) { 18 | console.log("ROAKPOS service worker caching dependencies"); 19 | filesToCache.map(function (url) { 20 | return cache.add(url).catch(function (reason) { 21 | return console.log( 22 | "ROAKPOS: " + String(reason) + " " + url 23 | ); 24 | }); 25 | }); 26 | }) 27 | ); 28 | }); 29 | 30 | // Activate 31 | self.addEventListener("activate", function (e) { 32 | console.log("ROAKPOS service worker activation"); 33 | e.waitUntil( 34 | caches.keys().then(function (keyList) { 35 | return Promise.all( 36 | keyList.map(function (key) { 37 | if (key !== cacheName) { 38 | console.log("ROAKPOS old cache removed", key); 39 | return caches.delete(key); 40 | } 41 | }) 42 | ); 43 | }) 44 | ); 45 | return self.clients.claim(); 46 | }); 47 | 48 | // Fetch 49 | self.addEventListener("fetch", function (e) { 50 | // Return if the current request url is in the never cache list 51 | if (!neverCacheUrls.every(checkNeverCacheList, e.request.url)) { 52 | console.log("ROAKPOS: Current request is excluded from cache."); 53 | return; 54 | } 55 | 56 | // Return if request url protocal isn't http or https 57 | if (!e.request.url.match(/^(http|https):\/\//i)) return; 58 | 59 | // Return if request url is from an external domain. 60 | if (new URL(e.request.url).origin !== location.origin) return; 61 | 62 | // For POST requests, do not use the cache. Serve offline page if offline. 63 | if (e.request.method !== "GET") { 64 | e.respondWith( 65 | fetch(e.request).catch(function () { 66 | return caches.match(offlinePage); 67 | }) 68 | ); 69 | return; 70 | } 71 | 72 | // Revving strategy 73 | if (e.request.mode === "navigate" && navigator.onLine) { 74 | e.respondWith( 75 | fetch(e.request).then(function (response) { 76 | return caches.open(cacheName).then(function (cache) { 77 | cache.put(e.request, response.clone()); 78 | return response; 79 | }); 80 | }) 81 | ); 82 | return caches.match(startPage); 83 | } 84 | 85 | e.respondWith( 86 | caches 87 | .match(e.request) 88 | .then(function (response) { 89 | return ( 90 | response || 91 | fetch(e.request).then(function (response) { 92 | return caches.open(cacheName).then(function (cache) { 93 | cache.delete(e.request, response.clone()); 94 | return response; 95 | }); 96 | }) 97 | ); 98 | }) 99 | .catch(function () { 100 | return caches.match(offlinePage); 101 | }) 102 | ); 103 | }); 104 | 105 | // Check if current url is in the neverCacheUrls list 106 | function checkNeverCacheList(url) { 107 | if (this.match(url)) { 108 | return false; 109 | } 110 | return true; 111 | } 112 | -------------------------------------------------------------------------------- /public/vendor/livewire/manifest.json: -------------------------------------------------------------------------------- 1 | {"/livewire.js":"/livewire.js?id=25f025805c3c370f7e87"} -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /resources/css/app.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariebj/roakpos/310db92e10e7717ca1fb84336d898367347311ad/resources/css/app.css -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | require("./bootstrap"); 2 | var Turbolinks = require("turbolinks"); 3 | Turbolinks.start(); 4 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | window._ = require('lodash'); 2 | 3 | /** 4 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 5 | * for JavaScript based Bootstrap features such as modals and tabs. This 6 | * code may be modified to fit the specific needs of your application. 7 | */ 8 | 9 | try { 10 | window.Popper = require('popper.js').default; 11 | window.$ = window.jQuery = require('jquery'); 12 | 13 | require('bootstrap'); 14 | } catch (e) {} 15 | 16 | /** 17 | * We'll load the axios HTTP library which allows us to easily issue requests 18 | * to our Laravel back-end. This library automatically handles sending the 19 | * CSRF token as a header based on the value of the "XSRF" token cookie. 20 | */ 21 | 22 | window.axios = require('axios'); 23 | 24 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 25 | 26 | /** 27 | * Echo exposes an expressive API for subscribing to channels and listening 28 | * for events that are broadcast by Laravel. Echo and event broadcasting 29 | * allows your team to easily build robust real-time web applications. 30 | */ 31 | 32 | // import Echo from 'laravel-echo'; 33 | 34 | // window.Pusher = require('pusher-js'); 35 | 36 | // window.Echo = new Echo({ 37 | // broadcaster: 'pusher', 38 | // key: process.env.MIX_PUSHER_APP_KEY, 39 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 40 | // forceTLS: true 41 | // }); 42 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'password' => 'The provided password is incorrect.', 18 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 17 | 'sent' => 'We have emailed your password reset link!', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that email address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | // Body 2 | $body-bg: #f8fafc; 3 | 4 | // Typography 5 | $font-family-sans-serif: 'Nunito', sans-serif; 6 | $font-size-base: 0.9rem; 7 | $line-height-base: 1.6; 8 | 9 | // Colors 10 | $blue: #3490dc; 11 | $indigo: #6574cd; 12 | $purple: #9561e2; 13 | $pink: #f66d9b; 14 | $red: #e3342f; 15 | $orange: #f6993f; 16 | $yellow: #ffed4a; 17 | $green: #38c172; 18 | $teal: #4dc0b5; 19 | $cyan: #6cb2eb; 20 | -------------------------------------------------------------------------------- /resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | // Fonts 2 | @import url('https://fonts.googleapis.com/css?family=Nunito'); 3 | 4 | // Variables 5 | @import 'variables'; 6 | 7 | // Bootstrap 8 | @import '~bootstrap/scss/bootstrap'; 9 | -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Login') }}
9 | 10 |
11 |
12 | @csrf 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | @error('email') 21 | 22 | {{ $message }} 23 | 24 | @enderror 25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 | 33 | 34 | @error('password') 35 | 36 | {{ $message }} 37 | 38 | @enderror 39 |
40 |
41 | 42 |
43 |
44 |
45 | 46 | 47 | 50 |
51 |
52 |
53 | 54 |
55 |
56 | 59 | 60 | @if (Route::has('password.request')) 61 | 62 | {{ __('Lupa Password ?') }} 63 | 64 | @endif 65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | @endsection -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /resources/views/auth/register.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Register') }}
9 | 10 |
11 |
12 | @csrf 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | @error('name') 21 | 22 | {{ $message }} 23 | 24 | @enderror 25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 | 33 | 34 | @error('email') 35 | 36 | {{ $message }} 37 | 38 | @enderror 39 |
40 |
41 | 42 |
43 | 44 | 45 |
46 | 47 | 48 | @error('password') 49 | 50 | {{ $message }} 51 | 52 | @enderror 53 |
54 |
55 | 56 |
57 | 58 | 59 |
60 | 61 |
62 |
63 | 64 |
65 |
66 | 69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | @endsection -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /resources/views/home.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 | @if (session('status')) 7 | 10 | @endif 11 |
12 | @if (Auth::user()->role == 'admin') 13 | @livewire('admin-home') 14 | @endif 15 | @if (Auth::user()->role == 'customer') 16 | @livewire('customer-home') 17 | @endif 18 |
19 | @endsection -------------------------------------------------------------------------------- /resources/views/livewire/categories.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
Kategori
5 |
6 |
7 | @foreach($categories as $key=>$value) 8 | 19 |
    20 |
  • 21 |
  • 22 |
23 | @endforeach 24 |
25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | @foreach($categories as $key=>$value) 39 | 40 | 41 | 42 | 43 | 44 | 45 | 51 | 52 | @endforeach 53 | @if($updateMode) 54 | @include('livewire.category-update') 55 | @else 56 | @include('livewire.category-create') 57 | @endif 58 | 59 | 60 |
61 | 68 |
69 |
70 | @push('scripts') 71 | 87 | @endpush -------------------------------------------------------------------------------- /resources/views/livewire/category-create.blade.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /resources/views/livewire/category-update.blade.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /resources/views/livewire/dashboard-nav.blade.php: -------------------------------------------------------------------------------- 1 | @if (Route::has('login')) 2 | @auth 3 |
4 | 5 | 49 | 50 |
51 | @endauth 52 | @endif -------------------------------------------------------------------------------- /resources/views/livewire/option-create.blade.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /resources/views/livewire/option-update.blade.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /resources/views/livewire/options.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
Opsi Menu
5 |
6 |
7 | @if($updateMode) 8 | @include('livewire.option-update') 9 | @else 10 | @include('livewire.option-create') 11 | @endif 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | @foreach($options as $key=>$value) 24 | 25 | 26 | 27 | 28 | 29 | 35 | 36 | @endforeach 37 | 38 |
NoIDNameDescriptionAksi
{{ $key+1 }} {{ $value->id}} {{ $value->name }} {{ $value->description }} 30 |
31 | 32 | 33 |
34 |
39 |
40 | 43 |
44 |
-------------------------------------------------------------------------------- /resources/views/livewire/ordermethod-create.blade.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /resources/views/livewire/ordermethod-update.blade.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /resources/views/livewire/ordermethods.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
Metode Pesan
5 |
6 |
7 | @if($updateMode) 8 | @include('livewire.ordermethod-update') 9 | @else 10 | @include('livewire.ordermethod-create') 11 | @endif 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | @foreach($ordermethods as $key=>$value) 24 | 25 | 26 | 27 | 28 | 29 | 35 | 36 | @endforeach 37 | 38 |
NoIDNameDescriptionAksi
{{ $key+1 }} {{ $value->id}} {{ $value->name }} {{ $value->description }} 30 |
31 | 32 | 33 |
34 |
39 |
40 | 47 |
48 |
-------------------------------------------------------------------------------- /resources/views/livewire/product-delete.blade.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /resources/views/livewire/product-image.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 39 | -------------------------------------------------------------------------------- /resources/views/livewire/profile.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
{{Auth::user()->name}}
7 |

8 | {{Auth::user()->email}} 9 |

10 |
11 |
12 | avatar 13 |
14 | @if($avatar) 15 | Preview Image 16 | @endif 17 |
18 | 19 |
20 | 21 | 22 | @error('avatar'){{ $message }}@enderror 23 |
24 |
25 |
26 |
27 | @if(isset($address)) 28 |
29 |

Alamat:
30 | {{$address->nama_depan}} {{$address->nama_belakang}}
31 | {{$address->alamat_1}},{{$address->alamat_2}}
32 | {{$address->kelurahan}}, {{$address->kecamatan}}
33 | {{$address->provinsi}}-{{$address->kode_pos}}
34 | Telp: {{$address->telepon}} 35 |

36 |
37 | 38 | 39 |
40 |
41 | @else 42 | 43 | @endif 44 | 45 | @if($updateMode) 46 | @include('livewire.address-update') 47 | @else 48 | @include('livewire.address-create') 49 | @endif 50 | 55 |
56 |
57 |
58 |
-------------------------------------------------------------------------------- /resources/views/livewire/receipt.blade.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /resources/views/livewire/search.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | 7 | 12 | 18 | 21 | 31 | 32 | 37 | 43 | 44 | 45 | 46 |
47 |
48 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 18 | return $request->user(); 19 | }); 20 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->purpose('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | true]); 32 | 33 | Route::group(['middleware' => ['auth', 'verified']], function () { 34 | Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home'); 35 | Route::get('/categories', Category::class)->name('categories'); 36 | Route::get('/products', Product::class)->name('products'); 37 | Route::get('/cart', Cart::class)->name('cart'); 38 | Route::get('/takeaway', Takeaway::class)->name('takeaway'); 39 | Route::get('/profile', Profile::class)->name('profile'); 40 | Route::get('/customer-home', CustomerHome::class)->name('customer-home'); 41 | Route::get('/admin-home', AdminHome::class)->name('admin-home'); 42 | Route::get('/options', Options::class)->name('options'); 43 | Route::get('/ordermethods', Ordermethods::class)->name('ordermethods'); 44 | Route::get('/reports', Reports::class)->name('reports'); 45 | }); 46 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/js/app.js', 'public/js') 15 | .sass('resources/sass/app.scss', 'public/css') 16 | .sourceMaps(); 17 | --------------------------------------------------------------------------------