From 62debcbe6d98e145fdd97f21b5495a3b8622a18b Mon Sep 17 00:00:00 2001 From: A1Gard Date: Wed, 19 Jun 2024 08:28:06 +0330 Subject: [PATCH] added customer controller added state and city installed api route added address input --- app/Helpers/Helper.php | 77 +- app/Helpers/PersianFaker.php | 78 ++ .../Controllers/Admin/AddressController.php | 118 +++ .../Controllers/Admin/CategoryController.php | 14 +- .../Controllers/Admin/CustomerController.php | 139 +++ app/Http/Controllers/Api/StateController.php | 70 ++ app/Http/Requests/CustomerSaveRequest.php | 32 + app/Http/Resources/CityCollection.php | 25 + app/Http/Resources/StateCollection.php | 26 + app/Models/City.php | 15 + app/Models/Customer.php | 40 +- app/Models/State.php | 19 + bootstrap/app.php | 1 + composer.json | 1 + composer.lock | 66 +- config/sanctum.php | 83 ++ database/factories/CustomerFactory.php | 8 +- database/factories/StateFactory.php | 23 + .../2024_05_07_124141_create_states_table.php | 32 + ...24_05_07_125920_create_customers_table.php | 8 +- .../2024_06_07_134141_create_cities_table.php | 32 + ...4_06_09_134141_create_addresses_table.php} | 11 +- ...24_create_personal_access_tokens_table.php | 33 + database/seeders/CustomerSeeder.php | 2 + database/seeders/DatabaseSeeder.php | 5 +- database/seeders/StateSeeder.php | 74 ++ package-lock.json | 872 ++++++++++++++++++ package.json | 4 +- resources/js/app.js | 3 + resources/js/components/AddressInput.vue | 424 +++++++++ resources/js/panel/general-events.js | 19 +- resources/sass/app.scss | 1 + .../admin/customers/customer-form.blade.php | 147 +++ .../admin/customers/customer-list.blade.php | 15 + .../views/components/panel-footer.blade.php | 1 + .../components/panel-side-navbar.blade.php | 2 +- routes/api.php | 38 + routes/web.php | 25 + yarn.lock | 130 +-- 39 files changed, 2606 insertions(+), 107 deletions(-) create mode 100644 app/Helpers/PersianFaker.php create mode 100644 app/Http/Controllers/Admin/AddressController.php create mode 100644 app/Http/Controllers/Admin/CustomerController.php create mode 100644 app/Http/Controllers/Api/StateController.php create mode 100644 app/Http/Requests/CustomerSaveRequest.php create mode 100644 app/Http/Resources/CityCollection.php create mode 100644 app/Http/Resources/StateCollection.php create mode 100644 app/Models/City.php create mode 100644 app/Models/State.php create mode 100644 config/sanctum.php create mode 100644 database/factories/StateFactory.php create mode 100644 database/migrations/2024_05_07_124141_create_states_table.php create mode 100644 database/migrations/2024_06_07_134141_create_cities_table.php rename database/migrations/{2024_05_07_134141_create_addresses_table.php => 2024_06_09_134141_create_addresses_table.php} (63%) create mode 100644 database/migrations/2024_06_19_024824_create_personal_access_tokens_table.php create mode 100644 database/seeders/StateSeeder.php create mode 100644 package-lock.json create mode 100644 resources/js/components/AddressInput.vue create mode 100644 resources/views/admin/customers/customer-form.blade.php create mode 100644 resources/views/admin/customers/customer-list.blade.php create mode 100644 routes/api.php diff --git a/app/Helpers/Helper.php b/app/Helpers/Helper.php index 033872b..c764d9d 100644 --- a/app/Helpers/Helper.php +++ b/app/Helpers/Helper.php @@ -8,7 +8,7 @@ use Illuminate\Support\Facades\Route; * @param $lang code like fa * @return string */ -function getEmojiLanguagebyCode($lang) : string +function getEmojiLanguagebyCode($lang): string { $languages = [ "af" => "🇿🇦", // Afrikaans @@ -93,12 +93,12 @@ function getEmojiLanguagebyCode($lang) : string * @return bool */ -function hasRoute($name) : bool +function hasRoute($name): bool { // create route - $routes = explode('.',request()->route()->getName()); - $routes[count($routes) - 1 ] = $name; - $cRuote = implode('.',$routes); + $routes = explode('.', request()->route()->getName()); + $routes[count($routes) - 1] = $name; + $cRuote = implode('.', $routes); if (\Illuminate\Support\Facades\Route::has($cRuote)) { return true; @@ -113,12 +113,12 @@ function hasRoute($name) : bool * @param $args array * @return string|null */ -function getRoute($name, $args = []) : string | null +function getRoute($name, $args = []): string|null { // create route - $routes = explode('.',request()->route()->getName()); - $routes[count($routes) - 1 ] = $name; - $cRuote = implode('.',$routes); + $routes = explode('.', request()->route()->getName()); + $routes[count($routes) - 1] = $name; + $cRuote = implode('.', $routes); if (\Illuminate\Support\Facades\Route::has($cRuote)) { return \route($cRuote, $args); @@ -133,7 +133,7 @@ function getRoute($name, $args = []) : string | null * @param $col string * @return string */ -function sortSuffix($col) : string +function sortSuffix($col): string { if (request()->sort == $col) { if (request('sortType', 'asc') == 'desc') { @@ -153,7 +153,7 @@ function sortSuffix($col) : string * @param $translate * @return false|string */ -function arrayNormolizeVueCompatible($array, $translate = false): false | string +function arrayNormolizeVueCompatible($array, $translate = false): false|string { $result = []; foreach ($array as $index => $item) { @@ -168,7 +168,8 @@ function arrayNormolizeVueCompatible($array, $translate = false): false | string * @param $string * @return bool */ -function isJson($string) : bool { +function isJson($string): bool +{ json_decode($string); return json_last_error() === JSON_ERROR_NONE; } @@ -200,7 +201,7 @@ function logAdminBatch($method, $cls, $ids): void * @param $id * @return void */ -function logAdmin($method, $cls, $id) :void +function logAdmin($method, $cls, $id): void { $act = explode('\\', $method); auth()->user()->logs()->create([ @@ -216,9 +217,10 @@ function logAdmin($method, $cls, $id) :void * @param $except * @return string */ -function queryBuilder($except = null){ +function queryBuilder($except = null) +{ $queries = request()->toArray(); - if ($except != null){ + if ($except != null) { unset($queries[$except]); unset($queries['sortType']); } @@ -234,7 +236,7 @@ function queryBuilder($except = null){ function sluger($name, $replace_char = '-') { // special chars - $name = str_replace(['&', '+' , '@', '*'], ['and', 'plus', 'at', 'star'], $name); + $name = str_replace(['&', '+', '@', '*'], ['and', 'plus', 'at', 'star'], $name); // replace non letter or digits by - $name = preg_replace('~[^\pL\d\.]+~u', $replace_char, $name); @@ -367,9 +369,10 @@ function showCatNestedControl($cats, $checked = [], $parent = null) * @param $modelable_id * @return string */ -function getModelName($modelable_type,$modelable_id){ - $r = explode('\\',$modelable_type); - return $r[count($r)-1].':'.$modelable_id; +function getModelName($modelable_type, $modelable_id) +{ + $r = explode('\\', $modelable_type); + return $r[count($r) - 1] . ':' . $modelable_id; } /** @@ -378,22 +381,36 @@ function getModelName($modelable_type,$modelable_id){ * @param $modelable_id * @return string */ -function getModelLink($modelable_type,$modelable_id){ - $r = explode('\\',$modelable_type); - $model = strtolower($r[count($r)-1]); - $name = 'admin.'.$model.'.show'; - if (Route::has($name)){ - return \route($name,$modelable_id); - }else{ +function getModelLink($modelable_type, $modelable_id) +{ + $r = explode('\\', $modelable_type); + $model = strtolower($r[count($r) - 1]); + $name = 'admin.' . $model . '.show'; + if (Route::has($name)) { + return \route($name, $modelable_id); + } else { return ''; } } -function getAction($act){ - $r = explode('::',$act); - return ucfirst($r[count($r)-1]); +function getAction($act) +{ + $r = explode('::', $act); + return ucfirst($r[count($r) - 1]); } +function getAdminRoutes() +{ + $routes = []; + foreach (Illuminate\Support\Facades\Route::getRoutes() as $r) { + if (strpos($r->getName(), 'admin') !== false) { + $routes[] = [ + 'name' => $r->getName(), + 'url' => $r->uri(), + ]; + } + } - + return $routes; +} diff --git a/app/Helpers/PersianFaker.php b/app/Helpers/PersianFaker.php new file mode 100644 index 0000000..c000abf --- /dev/null +++ b/app/Helpers/PersianFaker.php @@ -0,0 +1,78 @@ + ['name' => 'قرمز', 'code' => '#ff0000'], + 'blue' => ['name' => 'آبی', 'code' => '#0000ff'], + 'green' => ['name' => 'سبز', 'code' => '#008000'], + 'yellow' => ['name' => 'زرد', 'code' => '#ffff00'], + 'purple' => ['name' => 'بنفش', 'code' => '#800080'], + 'orange' => ['name' => 'نارنجی', 'code' => '#ffa500'], + 'pink' => ['name' => 'صورتی', 'code' => '#ffc0cb'], + 'white' => ['name' => 'سفید', 'code' => '#ffffff'], + 'black' => ['name' => 'سیاه', 'code' => '#000000'], + 'grey' => ['name' => 'خاکستری', 'code' => '#808080'], + 'brown' => ['name' => 'قهوه‌ای', 'code' => '#a52a2a'], + 'silver' => ['name' => 'نقره‌ای', 'code' => '#c0c0c0'], + 'gold' => ['name' => 'طلایی', 'code' => '#ffd700'], + 'turquoise' => ['name' => 'فیروزه ای', 'code' => '#40e0d0'], + 'magenta' => ['name' => 'بنفش روشن', 'code' => '#ff00ff'], + 'cyan' => ['name' => 'فیروزی', 'code' => '#00ffff'], + 'maroon' => ['name' => 'آبی کمرنگ', 'code' => '#800000'], + 'navy' => ['name' => 'نیرویی', 'code' => '#000080'], + 'teal' => ['name' => 'نیلی', 'code' => '#008080'], + 'olive' => ['name' => 'زیتونی', 'code' => '#808000'], + ]; + + static public function mobile() + { + return self::$mobile_prefix[rand(0, count(self::$mobile_prefix) - 1)] . rand(1000000, 9999999); + } + + + static public function shetabCard() + { + return self::$card_prefix[rand(0, count(self::$card_prefix) - 1)] . '-' + . rand(1000, 9999) . '-' . rand(1000, 9999) . '-' . rand(1000, 9999); + } + + + static function validCodeMeli() + { + do { + $randomNumber = str_pad(mt_rand(1, 99999999), 8, '0', STR_PAD_LEFT); + $code = '0000' . $randomNumber; + $code = substr($code, strlen($code) - 10, 10); + + if (intval(substr($code, 3, 6)) == 0) { + continue; + } + + $checksum = intval(substr($code, 9, 1)); + $s = 0; + for ($i = 0; $i < 9; $i++) { + $s += intval(substr($code, $i, 1)) * (10 - $i); + } + + $s = $s % 11; + + if (($s < 2 && $checksum == $s) || ($s >= 2 && $checksum == (11 - $s))) { + return $code; + } + } while (true); + } + + + static public function color(){ + $colors = self::$colors; + shuffle($colors); + return $colors[0]; + } +} diff --git a/app/Http/Controllers/Admin/AddressController.php b/app/Http/Controllers/Admin/AddressController.php new file mode 100644 index 0000000..efbcc50 --- /dev/null +++ b/app/Http/Controllers/Admin/AddressController.php @@ -0,0 +1,118 @@ +address = $request->input('address'); + $address->lat = $request->input('lat'); + $address->lng = $request->input('lng'); + $address->state_id = $request->input('state_id')??null; + $address->city_id = $request->input('city_id')??null; + $address->zip = $request->input('zip'); + $address->save(); + return $address; + } + + /** + * Display a listing of the resource. + */ + public function index() + { + // + } + + /** + * Show the form for creating a new resource. + */ + public function create() + { + // + } + + /** + * Store a newly created resource in storage. + */ + public function store(Request $request, Customer $item) + { + // + + $request->validate([ + 'address' => ['required', 'string', 'min:10'], + 'zip' => ['required', 'string', 'min:5'], + 'state_id' => ['required', 'exists:states,id'], + 'city_id' => ['required', 'exists:cities,id'], + 'lat' => ['nullable'], + 'lng' => ['nullable'], + ]); + + $address = new Address(); + $address->customer_id = $item->id; + $address = $this->save($address, $request); + logAdmin(__METHOD__,Address::class,$address->id); + return ['OK' => true,'message' => __("Address added to :CUSTOMER",['CUSTOMER'=>$item->name]), 'list'=> $item->addresses]; + + } + + /** + * Display the specified resource. + */ + public function show(Address $address) + { + // + } + + /** + * Show the form for editing the specified resource. + */ + public function edit(Address $address) + { + // + } + + /** + * Update the specified resource in storage. + */ + public function update(Request $request, Address $item) + { + // + $request->validate([ + 'address' => ['required', 'string', 'min:10'], + 'zip' => ['required', 'string', 'min:5'], + 'state_id' => ['required', 'exists:states,id'], + 'city_id' => ['required', 'exists:cities,id'], + 'lat' => ['nullable'], + 'lng' => ['nullable'], + ]); + $this->save($item, $request); + logAdmin(__METHOD__,Address::class,$item->id); + return ['OK' => true, "message" => __("address updated")]; + } + + /** + * Remove the specified resource from storage. + */ + public function destroy(Address $item) + { + // + $add = $item->address ; + + logAdmin(__METHOD__,Address::class,$item->id); + $item->delete(); + return ['OK' => true, "message" => __(":ADDRESS removed",['ADDRESS' => $add])]; + } + + + public function customer(Customer $item) + { + return $item->addresses; + } +} diff --git a/app/Http/Controllers/Admin/CategoryController.php b/app/Http/Controllers/Admin/CategoryController.php index 6459bd1..f0d8d87 100644 --- a/app/Http/Controllers/Admin/CategoryController.php +++ b/app/Http/Controllers/Admin/CategoryController.php @@ -99,7 +99,13 @@ class CategoryController extends XController $msg = __(':COUNT items deleted successfully', ['COUNT' => count($ids)]); $this->_MODEL_::destroy($ids); break; - + case 'restore': + $msg = __(':COUNT items restored successfully', ['COUNT' => count($ids)]); + foreach ($ids as $id) { + $this->_MODEL_::withTrashed()->find($id)->restore(); + } + break; + /*restore**/ default: $msg = __('Unknown bulk action : :ACTION', ["ACTION" => $action]); } @@ -118,5 +124,11 @@ class CategoryController extends XController return $this->bringUp($request, $item); } + /**restore*/ + public function restore($item) + { + return parent::restoreing(Category::withTrashed()->where('id', $item)->first()); + } + /*restore**/ } diff --git a/app/Http/Controllers/Admin/CustomerController.php b/app/Http/Controllers/Admin/CustomerController.php new file mode 100644 index 0000000..c97c5e0 --- /dev/null +++ b/app/Http/Controllers/Admin/CustomerController.php @@ -0,0 +1,139 @@ + + ['title' => "Edit", 'class' => 'btn-outline-primary', 'icon' => 'ri-edit-2-line'], + 'show' => + ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], + 'destroy' => + ['title' => "Remove", 'class' => 'btn-outline-danger delete-confirm', 'icon' => 'ri-close-line'], + ]; + + + public function __construct() + { + parent::__construct(Customer::class, CustomerSaveRequest::class); + } + + /** + * @param $customer Customer + * @param $request CustomerSaveRequest + * @return Customer + */ + public function save($customer, $request) + { + + $customer->name = $request->input('name'); + $customer->address = $request->input('address'); + $customer->state = $request->input('state'); + $customer->credit = $request->input('credit')??0 ; + $customer->city = $request->input('city'); + $customer->postal_code = $request->input('postal_code'); + if ($request->has('email')) { + $customer->email = $request->input('email'); + } + $customer->mobile = $request->input('mobile'); + $customer->description = $request->input('description'); + + if (trim($request->input('password')) != '') { + $customer->password = bcrypt($request->input('password')); + } + $customer->colleague = $request->has('colleague'); + $customer->save(); + return $customer; + + } + + + /** + * Show the form for creating a new resource. + */ + public function create() + { + // + return view($this->formView); + } + + /** + * Show the form for editing the specified resource. + */ + public function edit(Customer $item) + { + // + return view($this->formView, compact('item')); + } + + public function bulk(Request $request) + { + +// dd($request->all()); + $data = explode('.', $request->input('action')); + $action = $data[0]; + $ids = $request->input('id'); + switch ($action) { + case 'delete': + $msg = __(':COUNT items deleted successfully', ['COUNT' => count($ids)]); + $this->_MODEL_::destroy($ids); + break; + /**restore*/ + case 'restore': + $msg = __(':COUNT items restored successfully', ['COUNT' => count($ids)]); + foreach ($ids as $id) { + $this->_MODEL_::withTrashed()->find($id)->restore(); + } + break; + /*restore**/ + default: + $msg = __('Unknown bulk action : :ACTION', ["ACTION" => $action]); + } + + return $this->do_bulk($msg, $action, $ids); + } + + public function destroy(Customer $item) + { + return parent::delete($item); + } + + + public function update(Request $request, Customer $item) + { + return $this->bringUp($request, $item); + } + + + /**restore*/ + public function restore($item) + { + return parent::restoreing(Customer::withTrashed()->where('id', $item)->first()); + } + /*restore**/ + + +} diff --git a/app/Http/Controllers/Api/StateController.php b/app/Http/Controllers/Api/StateController.php new file mode 100644 index 0000000..a0fe9f3 --- /dev/null +++ b/app/Http/Controllers/Api/StateController.php @@ -0,0 +1,70 @@ +cities); + } + + /** + * Show the form for editing the specified resource. + */ + public function edit(State $state) + { + // + } + + /** + * Update the specified resource in storage. + */ + public function update(Request $request, State $state) + { + // + } + + /** + * Remove the specified resource from storage. + */ + public function destroy(State $state) + { + // + } +} diff --git a/app/Http/Requests/CustomerSaveRequest.php b/app/Http/Requests/CustomerSaveRequest.php new file mode 100644 index 0000000..d9488b8 --- /dev/null +++ b/app/Http/Requests/CustomerSaveRequest.php @@ -0,0 +1,32 @@ +check(); + } + + /** + * Get the validation rules that apply to the request. + * + * @return array|string> + */ + public function rules(): array + { + return [ + // + 'name' => ['required', 'string', 'max:255'], + 'email' => ['required', 'string', 'email', 'max:255', 'unique:customers,email'], + 'password' => ['nullable', 'string', 'min:6', 'confirmed'], + 'mobile'=> ['required', 'string', 'min:10'], + ]; + } +} diff --git a/app/Http/Resources/CityCollection.php b/app/Http/Resources/CityCollection.php new file mode 100644 index 0000000..4ec8818 --- /dev/null +++ b/app/Http/Resources/CityCollection.php @@ -0,0 +1,25 @@ + + */ + public function toArray(Request $request): array + { + return [ + 'id' => $this->id, + 'name' => $this->name, + 'lat' => $this->lat, + 'lng' => $this->lng + ]; + } +} diff --git a/app/Http/Resources/StateCollection.php b/app/Http/Resources/StateCollection.php new file mode 100644 index 0000000..0583176 --- /dev/null +++ b/app/Http/Resources/StateCollection.php @@ -0,0 +1,26 @@ + + */ + public function toArray(Request $request): array + { + return [ + 'id' => $this->id, + 'name' => $this->name, + 'country' => $this->country, + 'lat' => $this->lat, + 'lng' => $this->lng + ]; + } +} diff --git a/app/Models/City.php b/app/Models/City.php new file mode 100644 index 0000000..b2b3aee --- /dev/null +++ b/app/Models/City.php @@ -0,0 +1,15 @@ + 'datetime', + 'dob' => 'date' + ]; + + public function invoices(){ + return $this->hasMany(Invoice::class); + } + + public function tickets(){ + return $this->hasMany(Ticket::class); + } + + public function main_tickets(){ + return $this->hasMany(Ticket::class)->whereNull('parent_id'); + } + + public function products(){ + return $this->belongsToMany(Product::class,'customer_product'); + } + public function credits(){ + return $this->hasMany(Credit::class); + } + + public function addresses(){ + return $this->hasMany(Address::class); + } + + } diff --git a/app/Models/State.php b/app/Models/State.php new file mode 100644 index 0000000..97b559d --- /dev/null +++ b/app/Models/State.php @@ -0,0 +1,19 @@ +hasMany(City::class); + } +} diff --git a/bootstrap/app.php b/bootstrap/app.php index 7b162da..d654276 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -7,6 +7,7 @@ use Illuminate\Foundation\Configuration\Middleware; return Application::configure(basePath: dirname(__DIR__)) ->withRouting( web: __DIR__.'/../routes/web.php', + api: __DIR__.'/../routes/api.php', commands: __DIR__.'/../routes/console.php', health: '/up', ) diff --git a/composer.json b/composer.json index e1225f3..ea33ab7 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,7 @@ "dpsoft/saderat": "^4.0", "dpsoft/zibal": "^2.0", "laravel/framework": "^11.0", + "laravel/sanctum": "^4.0", "laravel/tinker": "^2.9", "laravel/ui": "^4.5", "pishran/zarinpal": "^4.3", diff --git a/composer.lock b/composer.lock index 3389299..435b03b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "dbfddb0272c6537f8f25994eb973c21e", + "content-hash": "c313d4b398df8da8dc636019a4659513", "packages": [ { "name": "brick/math", @@ -1766,6 +1766,70 @@ }, "time": "2024-05-27T13:53:20+00:00" }, + { + "name": "laravel/sanctum", + "version": "v4.0.2", + "source": { + "type": "git", + "url": "https://github.com/laravel/sanctum.git", + "reference": "9cfc0ce80cabad5334efff73ec856339e8ec1ac1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/9cfc0ce80cabad5334efff73ec856339e8ec1ac1", + "reference": "9cfc0ce80cabad5334efff73ec856339e8ec1ac1", + "shasum": "" + }, + "require": { + "ext-json": "*", + "illuminate/console": "^11.0", + "illuminate/contracts": "^11.0", + "illuminate/database": "^11.0", + "illuminate/support": "^11.0", + "php": "^8.2", + "symfony/console": "^7.0" + }, + "require-dev": { + "mockery/mockery": "^1.6", + "orchestra/testbench": "^9.0", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.5" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Sanctum\\SanctumServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Sanctum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.", + "keywords": [ + "auth", + "laravel", + "sanctum" + ], + "support": { + "issues": "https://github.com/laravel/sanctum/issues", + "source": "https://github.com/laravel/sanctum" + }, + "time": "2024-04-10T19:39:58+00:00" + }, { "name": "laravel/serializable-closure", "version": "v1.3.3", diff --git a/config/sanctum.php b/config/sanctum.php new file mode 100644 index 0000000..764a82f --- /dev/null +++ b/config/sanctum.php @@ -0,0 +1,83 @@ + explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( + '%s%s', + 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', + Sanctum::currentApplicationUrlWithPort() + ))), + + /* + |-------------------------------------------------------------------------- + | Sanctum Guards + |-------------------------------------------------------------------------- + | + | This array contains the authentication guards that will be checked when + | Sanctum is trying to authenticate a request. If none of these guards + | are able to authenticate the request, Sanctum will use the bearer + | token that's present on an incoming request for authentication. + | + */ + + 'guard' => ['web'], + + /* + |-------------------------------------------------------------------------- + | Expiration Minutes + |-------------------------------------------------------------------------- + | + | This value controls the number of minutes until an issued token will be + | considered expired. This will override any values set in the token's + | "expires_at" attribute, but first-party sessions are not affected. + | + */ + + 'expiration' => null, + + /* + |-------------------------------------------------------------------------- + | Token Prefix + |-------------------------------------------------------------------------- + | + | Sanctum can prefix new tokens in order to take advantage of numerous + | security scanning initiatives maintained by open source platforms + | that notify developers if they commit tokens into repositories. + | + | See: https://docs.github.com/en/code-security/secret-scanning/about-secret-scanning + | + */ + + 'token_prefix' => env('SANCTUM_TOKEN_PREFIX', ''), + + /* + |-------------------------------------------------------------------------- + | Sanctum Middleware + |-------------------------------------------------------------------------- + | + | When authenticating your first-party SPA with Sanctum you may need to + | customize some of the middleware Sanctum uses while processing the + | request. You may change the middleware listed below as required. + | + */ + + 'middleware' => [ + 'authenticate_session' => Laravel\Sanctum\Http\Middleware\AuthenticateSession::class, + 'encrypt_cookies' => Illuminate\Cookie\Middleware\EncryptCookies::class, + 'validate_csrf_token' => Illuminate\Foundation\Http\Middleware\ValidateCsrfToken::class, + ], + +]; diff --git a/database/factories/CustomerFactory.php b/database/factories/CustomerFactory.php index b077ca2..4761cba 100644 --- a/database/factories/CustomerFactory.php +++ b/database/factories/CustomerFactory.php @@ -2,6 +2,7 @@ namespace Database\Factories; +use App\Helpers\PersianFaker; use Illuminate\Database\Eloquent\Factories\Factory; /** @@ -17,7 +18,12 @@ class CustomerFactory extends Factory public function definition(): array { return [ - // + 'name' => $this->faker->name, + 'mobile' => PersianFaker::mobile(), + 'email' => $this->faker->unique()->email, + 'password' => bcrypt('password'), + 'credit' => 0, + 'description' => __('Credit card:').PHP_EOL.PersianFaker::shetabCard(), ]; } } diff --git a/database/factories/StateFactory.php b/database/factories/StateFactory.php new file mode 100644 index 0000000..3d67b77 --- /dev/null +++ b/database/factories/StateFactory.php @@ -0,0 +1,23 @@ + + */ +class StateFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + // + ]; + } +} diff --git a/database/migrations/2024_05_07_124141_create_states_table.php b/database/migrations/2024_05_07_124141_create_states_table.php new file mode 100644 index 0000000..2749131 --- /dev/null +++ b/database/migrations/2024_05_07_124141_create_states_table.php @@ -0,0 +1,32 @@ +id(); + $table->text('name'); + $table->double('lat'); + $table->double('lng'); + $table->text('country'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('states'); + } +}; diff --git a/database/migrations/2024_05_07_125920_create_customers_table.php b/database/migrations/2024_05_07_125920_create_customers_table.php index 25e9068..262035c 100644 --- a/database/migrations/2024_05_07_125920_create_customers_table.php +++ b/database/migrations/2024_05_07_125920_create_customers_table.php @@ -18,18 +18,16 @@ return new class extends Migration $table->timestamp('email_verified_at')->nullable()->default(null); $table->string('password')->nullable()->default(null); - $table->unsignedInteger('state')->nullable()->default(null); - $table->unsignedInteger('city')->nullable()->default(null); $table->string('mobile',15)->unique()->nullable()->default(null); - $table->string('address',2048)->nullable()->default(null); - $table->string('postal_code',15)->nullable()->default(null); + $table->date('dob')->nullable()->default(null); $table->string('sms',10)->nullable()->default(null); $table->string('code',10)->nullable()->default(null); $table->boolean('colleague')->default(false); $table->text('description')->default(null)->nullable(); - $table->unsignedBigInteger('credit')->default(0); + $table->bigInteger('credit')->default(0); $table->rememberToken(); $table->timestamps(); + $table->softDeletes(); }); } diff --git a/database/migrations/2024_06_07_134141_create_cities_table.php b/database/migrations/2024_06_07_134141_create_cities_table.php new file mode 100644 index 0000000..ff7a5b4 --- /dev/null +++ b/database/migrations/2024_06_07_134141_create_cities_table.php @@ -0,0 +1,32 @@ +id(); + $table->text('name'); + $table->double('lat')->nullable(); + $table->double('lng')->nullable(); + $table->unsignedBigInteger('state_id'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('cities'); + } +}; diff --git a/database/migrations/2024_05_07_134141_create_addresses_table.php b/database/migrations/2024_06_09_134141_create_addresses_table.php similarity index 63% rename from database/migrations/2024_05_07_134141_create_addresses_table.php rename to database/migrations/2024_06_09_134141_create_addresses_table.php index 3032303..bc0939a 100644 --- a/database/migrations/2024_05_07_134141_create_addresses_table.php +++ b/database/migrations/2024_06_09_134141_create_addresses_table.php @@ -17,13 +17,18 @@ return new class extends Migration $table->unsignedBigInteger('customer_id'); $table->double('lat')->nullable(); $table->double('lng')->nullable(); - $table->unsignedInteger('state')->nullable()->default(null); - $table->unsignedInteger('city')->nullable()->default(null); - $table->json('data'); + $table->unsignedBigInteger('state_id')->nullable()->default(null); + $table->unsignedBigInteger('city_id')->nullable()->default(null); + $table->json('data')->nullable(); + $table->string('zip')->nullable()->comment('postal code'); $table->timestamps(); $table->softDeletes(); $table->foreign('customer_id')->references('id') ->on('customers')->onDelete('cascade'); + $table->foreign('state_id')->references('id') + ->on('states')->onDelete('cascade'); + $table->foreign('city_id')->references('id') + ->on('cities')->onDelete('cascade'); }); } diff --git a/database/migrations/2024_06_19_024824_create_personal_access_tokens_table.php b/database/migrations/2024_06_19_024824_create_personal_access_tokens_table.php new file mode 100644 index 0000000..e828ad8 --- /dev/null +++ b/database/migrations/2024_06_19_024824_create_personal_access_tokens_table.php @@ -0,0 +1,33 @@ +id(); + $table->morphs('tokenable'); + $table->string('name'); + $table->string('token', 64)->unique(); + $table->text('abilities')->nullable(); + $table->timestamp('last_used_at')->nullable(); + $table->timestamp('expires_at')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('personal_access_tokens'); + } +}; diff --git a/database/seeders/CustomerSeeder.php b/database/seeders/CustomerSeeder.php index 5d1bfc0..00ecd18 100644 --- a/database/seeders/CustomerSeeder.php +++ b/database/seeders/CustomerSeeder.php @@ -2,6 +2,7 @@ namespace Database\Seeders; +use App\Models\Customer; use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; @@ -13,5 +14,6 @@ class CustomerSeeder extends Seeder public function run(): void { // + Customer::factory(35)->create(); } } diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 339bbb1..39a9bcc 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -2,7 +2,9 @@ namespace Database\Seeders; +use App\Models\Customer; use App\Models\Post; +use App\Models\State; use Illuminate\Database\Seeder; use Illuminate\Support\Facades\Storage; @@ -24,10 +26,11 @@ class DatabaseSeeder extends Seeder '); $this->call([ - UserSeeder::class, GroupSeeder::class, PostSeeder::class, + StateSeeder::class, + CustomerSeeder::class, ] ); } diff --git a/database/seeders/StateSeeder.php b/database/seeders/StateSeeder.php new file mode 100644 index 0000000..b79e23c --- /dev/null +++ b/database/seeders/StateSeeder.php @@ -0,0 +1,74 @@ + ["آذربایجان شرقی", "38.0731", "46.2679"], + 2 => ["آذربایجان غربی", "37.5548", "45.0237"], + 3 => ["اردبیل", "38.2496", "48.2971"], + 4 => ["اصفهان", "32.6546", "51.6680"], + 5 => ["البرز", "35.9262", "50.9243"], + 6 => ["ایلام", "33.6368", "46.4180"], + 7 => ["بوشهر", "28.9676", "50.8374"], + 8 => ["تهران", "35.6892", "51.3890"], + 9 => ["چهارمحال و بختیاری", "32.3270", "50.8569"], + 10 => ["خراسان جنوبی", "32.8658", "59.2163"], + 11 => ["خراسان رضوی", "36.6700", "59.5700"], + 12 => ["خراسان شمالی", "37.4681", "57.3251"], + 13 => ["خوزستان", "31.3185", "48.6795"], + 14 => ["زنجان", "36.6785", "48.4766"], + 15 => ["سمنان", "35.5718", "53.3955"], + 16 => ["سیستان و بلوچستان", "27.5116", "60.8623"], + 17 => ["فارس", "29.0086", "53.6490"], + 18 => ["قزوین", "36.2714", "50.0045"], + 19 => ["قم", "34.6401", "50.8764"], + 20 => ["کردستان", "35.9456", "47.0137"], + 21 => ["کرمان", "30.2838", "57.0788"], + 22 => ["کرمانشاه", "34.3193", "47.0696"], + 23 => ["کهگیلویه و بویراحمد", "30.6474", "51.6098"], + 24 => ["گلستان", "37.2734", "54.0424"], + 25 => ["لرستان", "33.6289", "48.3568"], + 26 => ["گیلان", "37.2789", "49.5924"], + 27 => ["مازندران", "36.3359", "52.0530"], + 28 => ["مرکزی", "34.0957", "49.7193"], + 29 => ["هرمزگان", "27.1878", "56.2794"], + 30 => ["همدان", "34.7996", "48.5134"], + 31 => ["یزد", "31.8994", "54.3640"], + ]; + + + $cities = array(1 => array(1 => 'اسکو', 2 => 'اهر', 3 => 'ایلخچی', 4 => 'آبش احمد', 5 => 'آذرشهر', 6 => 'آقکند', 7 => 'باسمنج', 8 => 'بخشایش', 9 => 'بستان آباد', 10 => 'بناب', 11 => 'بناب جدید', 12 => 'تبریز', 13 => 'ترک', 14 => 'ترکمانچای', 15 => 'تسوج', 16 => 'تیکمه داش', 17 => 'جلفا', 18 => 'خاروانا', 19 => 'خامنه', 20 => 'خراجو', 21 => 'خسروشهر', 22 => 'خضرلو', 23 => 'خمارلو', 24 => 'خواجه', 25 => 'دوزدوزان', 26 => 'زرنق', 27 => 'زنوز', 28 => 'سراب', 29 => 'سردرود', 30 => 'سهند', 31 => 'سیس', 32 => 'سیه رود', 33 => 'شبستر', 34 => 'شربیان', 35 => 'شرفخانه', 36 => 'شندآباد', 37 => 'صوفیان', 38 => 'عجب شیر', 39 => 'قره آغاج', 40 => 'کشکسرای', 41 => 'کلوانق', 42 => 'کلیبر', 43 => 'کوزه کنان', 44 => 'گوگان', 45 => 'لیلان', 46 => 'مراغه', 47 => 'مرند', 48 => 'ملکان', 49 => 'ملک کیان', 50 => 'ممقان', 51 => 'مهربان', 52 => 'میانه', 53 => 'نظرکهریزی', 54 => 'هادی شهر', 55 => 'هرگلان', 56 => 'هریس', 57 => 'هشترود', 58 => 'هوراند', 59 => 'وایقان', 60 => 'ورزقان', 61 => 'یامچی',), 2 => array(62 => 'ارومیه', 63 => 'اشنویه', 64 => 'ایواوغلی', 65 => 'آواجیق', 66 => 'باروق', 67 => 'بازرگان', 68 => 'بوکان', 69 => 'پلدشت', 70 => 'پیرانشهر', 71 => 'تازه شهر', 72 => 'تکاب', 73 => 'چهاربرج', 74 => 'خوی', 75 => 'دیزج دیز', 76 => 'ربط', 77 => 'سردشت', 78 => 'سرو', 79 => 'سلماس', 80 => 'سیلوانه', 81 => 'سیمینه', 82 => 'سیه چشمه', 83 => 'شاهین دژ', 84 => 'شوط', 85 => 'فیرورق', 86 => 'قره ضیاءالدین', 87 => 'قطور', 88 => 'قوشچی', 89 => 'کشاورز', 90 => 'گردکشانه', 91 => 'ماکو', 92 => 'محمدیار', 93 => 'محمودآباد', 94 => 'مهاباد', 95 => 'میاندوآب', 96 => 'میرآباد', 97 => 'نالوس', 98 => 'نقده', 99 => 'نوشین',), 3 => array(100 => 'اردبیل', 101 => 'اصلاندوز', 102 => 'آبی بیگلو', 103 => 'بیله سوار', 104 => 'پارس آباد', 105 => 'تازه کند', 106 => 'تازه کندانگوت', 107 => 'جعفرآباد', 108 => 'خلخال', 109 => 'رضی', 110 => 'سرعین', 111 => 'عنبران', 112 => 'فخرآباد', 113 => 'کلور', 114 => 'کوراییم', 115 => 'گرمی', 116 => 'گیوی', 117 => 'لاهرود', 118 => 'مشگین شهر', 119 => 'نمین', 120 => 'نیر', 121 => 'هشتجین', 122 => 'هیر',), 4 => array(123 => 'ابریشم', 124 => 'ابوزیدآباد', 125 => 'اردستان', 126 => 'اژیه', 127 => 'اصفهان', 128 => 'افوس', 129 => 'انارک', 130 => 'ایمانشهر', 131 => 'آران وبیدگل', 132 => 'بادرود', 133 => 'باغ بهادران', 134 => 'بافران', 135 => 'برزک', 136 => 'برف انبار', 137 => 'بهاران شهر', 138 => 'بهارستان', 139 => 'بوئین و میاندشت', 140 => 'پیربکران', 141 => 'تودشک', 142 => 'تیران', 143 => 'جندق', 144 => 'جوزدان', 145 => 'جوشقان و کامو', 146 => 'چادگان', 147 => 'چرمهین', 148 => 'چمگردان', 149 => 'حبیب آباد', 150 => 'حسن آباد', 151 => 'حنا', 152 => 'خالدآباد', 153 => 'خمینی شهر', 154 => 'خوانسار', 155 => 'خور', 157 => 'خورزوق', 158 => 'داران', 159 => 'دامنه', 160 => 'درچه', 161 => 'دستگرد', 162 => 'دهاقان', 163 => 'دهق', 164 => 'دولت آباد', 165 => 'دیزیچه', 166 => 'رزوه', 167 => 'رضوانشهر', 168 => 'زاینده رود', 169 => 'زرین شهر', 170 => 'زواره', 171 => 'زیباشهر', 172 => 'سده لنجان', 173 => 'سفیدشهر', 174 => 'سگزی', 175 => 'سمیرم', 176 => 'شاهین شهر', 177 => 'شهرضا', 178 => 'طالخونچه', 179 => 'عسگران', 180 => 'علویجه', 181 => 'فرخی', 182 => 'فریدونشهر', 183 => 'فلاورجان', 184 => 'فولادشهر', 185 => 'قمصر', 186 => 'قهجاورستان', 187 => 'قهدریجان', 188 => 'کاشان', 189 => 'کرکوند', 190 => 'کلیشاد و سودرجان', 191 => 'کمشچه', 192 => 'کمه', 193 => 'کهریزسنگ', 194 => 'کوشک', 195 => 'کوهپایه', 196 => 'گرگاب', 197 => 'گزبرخوار', 198 => 'گلپایگان', 199 => 'گلدشت', 200 => 'گلشهر', 201 => 'گوگد', 202 => 'لای بید', 203 => 'مبارکه', 204 => 'مجلسی', 205 => 'محمدآباد', 206 => 'مشکات', 207 => 'منظریه', 208 => 'مهاباد', 209 => 'میمه', 210 => 'نائین', 211 => 'نجف آباد', 212 => 'نصرآباد', 213 => 'نطنز', 214 => 'نوش آباد', 215 => 'نیاسر', 216 => 'نیک آباد', 217 => 'هرند', 218 => 'ورزنه', 219 => 'ورنامخواست', 220 => 'وزوان', 221 => 'ونک',), 5 => array(222 => 'اسارا', 223 => 'اشتهارد', 224 => 'تنکمان', 225 => 'چهارباغ', 226 => 'سیف آباد', 227 => 'شهر جدید هشتگرد', 228 => 'طالقان', 229 => 'کرج', 230 => 'کمال شهر', 231 => 'کوهسار', 232 => 'گرمدره', 233 => 'ماهدشت', 234 => 'محمدشهر', 235 => 'مشکین دشت', 236 => 'نظرآباد', 237 => 'هشتگرد', 1117 => 'فردیس', 1118 => 'مارلیک',), 6 => array(238 => 'ارکواز', 239 => 'ایلام', 240 => 'ایوان', 241 => 'آبدانان', 242 => 'آسمان آباد', 243 => 'بدره', 244 => 'پهله', 245 => 'توحید', 246 => 'چوار', 247 => 'دره شهر', 248 => 'دلگشا', 249 => 'دهلران', 250 => 'زرنه', 251 => 'سراب باغ', 252 => 'سرابله', 253 => 'صالح آباد', 254 => 'لومار', 255 => 'مهران', 256 => 'مورموری', 257 => 'موسیان', 258 => 'میمه',), 7 => array(259 => 'امام حسن', 260 => 'انارستان', 261 => 'اهرم', 262 => 'آب پخش', 263 => 'آبدان', 264 => 'برازجان', 265 => 'بردخون', 266 => 'بندردیر', 267 => 'بندردیلم', 268 => 'بندرریگ', 269 => 'بندرکنگان', 270 => 'بندرگناوه', 271 => 'بنک', 272 => 'بوشهر', 273 => 'تنگ ارم', 274 => 'جم', 275 => 'چغادک', 276 => 'خارک', 277 => 'خورموج', 278 => 'دالکی', 279 => 'دلوار', 280 => 'ریز', 281 => 'سعدآباد', 282 => 'سیراف', 283 => 'شبانکاره', 284 => 'شنبه', 285 => 'عسلویه', 286 => 'کاکی', 287 => 'کلمه', 288 => 'نخل تقی', 289 => 'وحدتیه',), 8 => array(290 => 'ارجمند', 291 => 'اسلامشهر', 292 => 'اندیشه', 293 => 'آبسرد', 294 => 'آبعلی', 295 => 'باغستان', 296 => 'باقرشهر', 297 => 'بومهن', 298 => 'پاکدشت', 299 => 'پردیس', 300 => 'پیشوا', 301 => 'تهران', 302 => 'جوادآباد', 303 => 'چهاردانگه', 304 => 'حسن آباد', 305 => 'دماوند', 306 => 'دیزین', 307 => 'ری', 308 => 'رباط کریم', 309 => 'رودهن', 310 => 'شاهدشهر', 311 => 'شریف آباد', 312 => 'شمشک', 313 => 'شهریار', 314 => 'صالح آباد', 315 => 'صباشهر', 316 => 'صفادشت', 317 => 'فردوسیه', 318 => 'فشم', 319 => 'فیروزکوه', 320 => 'قدس', 321 => 'قرچک', 322 => 'کهریزک', 323 => 'کیلان', 324 => 'گلستان', 325 => 'لواسان', 326 => 'ملارد', 327 => 'میگون', 328 => 'نسیم شهر', 329 => 'نصیرآباد', 330 => 'وحیدیه', 331 => 'ورامین', 1116 => 'پرند',), 9 => array(332 => 'اردل', 333 => 'آلونی', 334 => 'باباحیدر', 335 => 'بروجن', 336 => 'بلداجی', 337 => 'بن', 338 => 'جونقان', 339 => 'چلگرد', 340 => 'سامان', 341 => 'سفیددشت', 342 => 'سودجان', 343 => 'سورشجان', 344 => 'شلمزار', 345 => 'شهرکرد', 346 => 'طاقانک', 347 => 'فارسان', 348 => 'فرادبنه', 349 => 'فرخ شهر', 350 => 'کیان', 351 => 'گندمان', 352 => 'گهرو', 353 => 'لردگان', 354 => 'مال خلیفه', 355 => 'ناغان', 356 => 'نافچ', 357 => 'نقنه', 358 => 'هفشجان',), 10 => array(359 => 'ارسک', 360 => 'اسدیه', 361 => 'اسفدن', 362 => 'اسلامیه', 363 => 'آرین شهر', 364 => 'آیسک', 365 => 'بشرویه', 366 => 'بیرجند', 367 => 'حاجی آباد', 368 => 'خضری دشت بیاض', 369 => 'خوسف', 370 => 'زهان', 371 => 'سرایان', 372 => 'سربیشه', 373 => 'سه قلعه', 374 => 'شوسف', 375 => 'طبس ', 376 => 'فردوس', 377 => 'قاین', 378 => 'قهستان', 379 => 'محمدشهر', 380 => 'مود', 381 => 'نهبندان', 382 => 'نیمبلوک',), 11 => array(383 => 'احمدآباد صولت', 384 => 'انابد', 385 => 'باجگیران', 386 => 'باخرز', 387 => 'بار', 388 => 'بایگ', 389 => 'بجستان', 390 => 'بردسکن', 391 => 'بیدخت', 392 => 'تایباد', 393 => 'تربت جام', 394 => 'تربت حیدریه', 395 => 'جغتای', 396 => 'جنگل', 397 => 'چاپشلو', 398 => 'چکنه', 399 => 'چناران', 400 => 'خرو', 401 => 'خلیل آباد', 402 => 'خواف', 403 => 'داورزن', 404 => 'درگز', 405 => 'در رود', 406 => 'دولت آباد', 407 => 'رباط سنگ', 408 => 'رشتخوار', 409 => 'رضویه', 410 => 'روداب', 411 => 'ریوش', 412 => 'سبزوار', 413 => 'سرخس', 414 => 'سفیدسنگ', 415 => 'سلامی', 416 => 'سلطان آباد', 417 => 'سنگان', 418 => 'شادمهر', 419 => 'شاندیز', 420 => 'ششتمد', 421 => 'شهرآباد', 422 => 'شهرزو', 423 => 'صالح آباد', 424 => 'طرقبه', 425 => 'عشق آباد', 426 => 'فرهادگرد', 427 => 'فریمان', 428 => 'فیروزه', 429 => 'فیض آباد', 430 => 'قاسم آباد', 431 => 'قدمگاه', 432 => 'قلندرآباد', 433 => 'قوچان', 434 => 'کاخک', 435 => 'کاریز', 436 => 'کاشمر', 437 => 'کدکن', 438 => 'کلات', 439 => 'کندر', 440 => 'گلمکان', 441 => 'گناباد', 442 => 'لطف آباد', 443 => 'مزدآوند', 444 => 'مشهد', 445 => 'ملک آباد', 446 => 'نشتیفان', 447 => 'نصرآباد', 448 => 'نقاب', 449 => 'نوخندان', 450 => 'نیشابور', 451 => 'نیل شهر', 452 => 'همت آباد', 453 => 'یونسی',), 12 => array(454 => 'اسفراین', 455 => 'ایور', 456 => 'آشخانه', 457 => 'بجنورد', 458 => 'پیش قلعه', 459 => 'تیتکانلو', 460 => 'جاجرم', 461 => 'حصارگرمخان', 462 => 'درق', 463 => 'راز', 464 => 'سنخواست', 465 => 'شوقان', 466 => 'شیروان', 467 => 'صفی آباد', 468 => 'فاروج', 469 => 'قاضی', 470 => 'گرمه', 471 => 'لوجلی',), 13 => array(472 => 'اروندکنار', 473 => 'الوان', 474 => 'امیدیه', 475 => 'اندیمشک', 476 => 'اهواز', 477 => 'ایذه', 478 => 'آبادان', 479 => 'آغاجاری', 480 => 'باغ ملک', 481 => 'بستان', 482 => 'بندرامام خمینی', 483 => 'بندرماهشهر', 484 => 'بهبهان', 485 => 'ترکالکی', 486 => 'جایزان', 487 => 'چمران', 488 => 'چویبده', 489 => 'حر', 490 => 'حسینیه', 491 => 'حمزه', 492 => 'حمیدیه', 493 => 'خرمشهر', 494 => 'دارخوین', 495 => 'دزآب', 496 => 'دزفول', 497 => 'دهدز', 498 => 'رامشیر', 499 => 'رامهرمز', 500 => 'رفیع', 501 => 'زهره', 502 => 'سالند', 503 => 'سردشت', 504 => 'سوسنگرد', 505 => 'شادگان', 506 => 'شاوور', 507 => 'شرافت', 508 => 'شوش', 509 => 'شوشتر', 510 => 'شیبان', 511 => 'صالح شهر', 512 => 'صفی آباد', 513 => 'صیدون', 514 => 'قلعه تل', 515 => 'قلعه خواجه', 516 => 'گتوند', 517 => 'لالی', 518 => 'مسجدسلیمان', 520 => 'ملاثانی', 521 => 'میانرود', 522 => 'مینوشهر', 523 => 'هفتگل', 524 => 'هندیجان', 525 => 'هویزه', 526 => 'ویس',), 14 => array(527 => 'ابهر', 528 => 'ارمغان خانه', 529 => 'آب بر', 530 => 'چورزق', 531 => 'حلب', 532 => 'خرمدره', 533 => 'دندی', 534 => 'زرین آباد', 535 => 'زرین رود', 536 => 'زنجان', 537 => 'سجاس', 538 => 'سلطانیه', 539 => 'سهرورد', 540 => 'صائین قلعه', 541 => 'قیدار', 542 => 'گرماب', 543 => 'ماه نشان', 544 => 'هیدج',), 15 => array(545 => 'امیریه', 546 => 'ایوانکی', 547 => 'آرادان', 548 => 'بسطام', 549 => 'بیارجمند', 550 => 'دامغان', 551 => 'درجزین', 552 => 'دیباج', 553 => 'سرخه', 554 => 'سمنان', 555 => 'شاهرود', 556 => 'شهمیرزاد', 557 => 'کلاته خیج', 558 => 'گرمسار', 559 => 'مجن', 560 => 'مهدی شهر', 561 => 'میامی',), 16 => array(562 => 'ادیمی', 563 => 'اسپکه', 564 => 'ایرانشهر', 565 => 'بزمان', 566 => 'بمپور', 567 => 'بنت', 568 => 'بنجار', 569 => 'پیشین', 570 => 'جالق', 571 => 'چابهار', 572 => 'خاش', 573 => 'دوست محمد', 574 => 'راسک', 575 => 'زابل', 576 => 'زابلی', 577 => 'زاهدان', 578 => 'زهک', 579 => 'سراوان', 580 => 'سرباز', 581 => 'سوران', 582 => 'سیرکان', 583 => 'علی اکبر', 584 => 'فنوج', 585 => 'قصرقند', 586 => 'کنارک', 587 => 'گشت', 588 => 'گلمورتی', 589 => 'محمدان', 590 => 'محمدآباد', 591 => 'محمدی', 592 => 'میرجاوه', 593 => 'نصرت آباد', 594 => 'نگور', 595 => 'نوک آباد', 596 => 'نیک شهر', 597 => 'هیدوچ',), 17 => array(598 => 'اردکان', 599 => 'ارسنجان', 600 => 'استهبان', 601 => 'اشکنان', 602 => 'افزر', 603 => 'اقلید', 604 => 'امام شهر', 605 => 'اهل', 606 => 'اوز', 607 => 'ایج', 608 => 'ایزدخواست', 609 => 'آباده', 610 => 'آباده طشک', 611 => 'باب انار', 612 => 'بالاده', 613 => 'بنارویه', 614 => 'بهمن', 615 => 'بوانات', 616 => 'بیرم', 617 => 'بیضا', 618 => 'جنت شهر', 619 => 'جهرم', 620 => 'جویم', 621 => 'زرین دشت', 622 => 'حسن آباد', 623 => 'خان زنیان', 624 => 'خاوران', 625 => 'خرامه', 626 => 'خشت', 627 => 'خنج', 628 => 'خور', 629 => 'داراب', 630 => 'داریان', 631 => 'دبیران', 632 => 'دژکرد', 633 => 'دهرم', 634 => 'دوبرجی', 635 => 'رامجرد', 636 => 'رونیز', 637 => 'زاهدشهر', 638 => 'زرقان', 639 => 'سده', 640 => 'سروستان', 641 => 'سعادت شهر', 642 => 'سورمق', 643 => 'سیدان', 644 => 'ششده', 645 => 'شهرپیر', 646 => 'شهرصدرا', 647 => 'شیراز', 648 => 'صغاد', 649 => 'صفاشهر', 650 => 'علامرودشت', 651 => 'فدامی', 652 => 'فراشبند', 653 => 'فسا', 654 => 'فیروزآباد', 655 => 'قائمیه', 656 => 'قادرآباد', 657 => 'قطب آباد', 658 => 'قطرویه', 659 => 'قیر', 660 => 'کارزین (فتح آباد)', 661 => 'کازرون', 662 => 'کامفیروز', 663 => 'کره ای', 664 => 'کنارتخته', 665 => 'کوار', 666 => 'گراش', 667 => 'گله دار', 668 => 'لار', 669 => 'لامرد', 670 => 'لپویی', 671 => 'لطیفی', 672 => 'مبارک آباددیز', 673 => 'مرودشت', 674 => 'مشکان', 675 => 'مصیری', 676 => 'مهر', 677 => 'میمند', 678 => 'نوبندگان', 679 => 'نوجین', 680 => 'نودان', 681 => 'نورآباد', 682 => 'نی ریز', 683 => 'وراوی',), 18 => array(684 => 'ارداق', 685 => 'اسفرورین', 686 => 'اقبالیه', 687 => 'الوند', 688 => 'آبگرم', 689 => 'آبیک', 690 => 'آوج', 691 => 'بوئین زهرا', 692 => 'بیدستان', 693 => 'تاکستان', 694 => 'خاکعلی', 695 => 'خرمدشت', 696 => 'دانسفهان', 697 => 'رازمیان', 698 => 'سگزآباد', 699 => 'سیردان', 700 => 'شال', 701 => 'شریفیه', 702 => 'ضیاآباد', 703 => 'قزوین', 704 => 'کوهین', 705 => 'محمدیه', 706 => 'محمودآباد نمونه', 707 => 'معلم کلایه', 708 => 'نرجه',), 19 => array(709 => 'جعفریه', 710 => 'دستجرد', 711 => 'سلفچگان', 712 => 'قم', 713 => 'قنوات', 714 => 'کهک',), 20 => array(715 => 'آرمرده', 716 => 'بابارشانی', 717 => 'بانه', 718 => 'بلبان آباد', 719 => 'بوئین سفلی', 720 => 'بیجار', 721 => 'چناره', 722 => 'دزج', 723 => 'دلبران', 724 => 'دهگلان', 725 => 'دیواندره', 726 => 'زرینه', 727 => 'سروآباد', 728 => 'سریش آباد', 729 => 'سقز', 730 => 'سنندج', 731 => 'شویشه', 732 => 'صاحب', 733 => 'قروه', 734 => 'کامیاران', 735 => 'کانی دینار', 736 => 'کانی سور', 737 => 'مریوان', 738 => 'موچش', 739 => 'یاسوکند',), 21 => array(740 => 'اختیارآباد', 741 => 'ارزوئیه', 742 => 'امین شهر', 743 => 'انار', 744 => 'اندوهجرد', 745 => 'باغین', 746 => 'بافت', 747 => 'بردسیر', 748 => 'بروات', 749 => 'بزنجان', 750 => 'بم', 751 => 'بهرمان', 752 => 'پاریز', 753 => 'جبالبارز', 754 => 'جوپار', 755 => 'جوزم', 756 => 'جیرفت', 757 => 'چترود', 758 => 'خاتون آباد', 759 => 'خانوک', 760 => 'خورسند', 761 => 'درب بهشت', 762 => 'دهج', 763 => 'رابر', 764 => 'راور', 765 => 'راین', 766 => 'رفسنجان', 767 => 'رودبار', 768 => 'ریحان شهر', 769 => 'زرند', 770 => 'زنگی آباد', 771 => 'زیدآباد', 772 => 'سیرجان', 773 => 'شهداد', 774 => 'شهربابک', 775 => 'صفائیه', 776 => 'عنبرآباد', 777 => 'فاریاب', 778 => 'فهرج', 779 => 'قلعه گنج', 780 => 'کاظم آباد', 781 => 'کرمان', 782 => 'کشکوئیه', 783 => 'کهنوج', 784 => 'کوهبنان', 785 => 'کیانشهر', 786 => 'گلباف', 787 => 'گلزار', 788 => 'لاله زار', 789 => 'ماهان', 790 => 'محمدآباد', 791 => 'محی آباد', 792 => 'مردهک', 793 => 'مس سرچشمه', 794 => 'منوجان', 795 => 'نجف شهر', 796 => 'نرماشیر', 797 => 'نظام شهر', 798 => 'نگار', 799 => 'نودژ', 800 => 'هجدک', 801 => 'یزدان شهر',), 22 => array(802 => 'ازگله', 803 => 'اسلام آباد غرب', 804 => 'باینگان', 805 => 'بیستون', 806 => 'پاوه', 807 => 'تازه آباد', 808 => 'جوان رود', 809 => 'حمیل', 810 => 'ماهیدشت', 811 => 'روانسر', 812 => 'سرپل ذهاب', 813 => 'سرمست', 814 => 'سطر', 815 => 'سنقر', 816 => 'سومار', 817 => 'شاهو', 818 => 'صحنه', 819 => 'قصرشیرین', 820 => 'کرمانشاه', 821 => 'کرندغرب', 822 => 'کنگاور', 823 => 'کوزران', 824 => 'گهواره', 825 => 'گیلانغرب', 826 => 'میان راهان', 827 => 'نودشه', 828 => 'نوسود', 829 => 'هرسین', 830 => 'هلشی',), 23 => array(831 => 'باشت', 832 => 'پاتاوه', 833 => 'چرام', 834 => 'چیتاب', 835 => 'دهدشت', 836 => 'دوگنبدان', 837 => 'دیشموک', 838 => 'سوق', 839 => 'سی سخت', 840 => 'قلعه رئیسی', 841 => 'گراب سفلی', 842 => 'لنده', 843 => 'لیکک', 844 => 'مادوان', 845 => 'مارگون', 846 => 'یاسوج',), 24 => array(847 => 'انبارآلوم', 848 => 'اینچه برون', 849 => 'آزادشهر', 850 => 'آق قلا', 851 => 'بندرترکمن', 852 => 'بندرگز', 853 => 'جلین', 854 => 'خان ببین', 855 => 'دلند', 856 => 'رامیان', 857 => 'سرخنکلاته', 858 => 'سیمین شهر', 859 => 'علی آباد کتول', 860 => 'فاضل آباد', 861 => 'کردکوی', 862 => 'کلاله', 863 => 'گالیکش', 864 => 'گرگان', 865 => 'گمیش تپه', 866 => 'گنبدکاووس', 867 => 'مراوه', 868 => 'مینودشت', 869 => 'نگین شهر', 870 => 'نوده خاندوز', 871 => 'نوکنده',), 25 => array(872 => 'ازنا', 873 => 'اشترینان', 874 => 'الشتر', 875 => 'الیگودرز', 876 => 'بروجرد', 877 => 'پلدختر', 878 => 'چالانچولان', 879 => 'چغلوندی', 880 => 'چقابل', 881 => 'خرم آباد', 882 => 'درب گنبد', 883 => 'دورود', 884 => 'زاغه', 885 => 'سپیددشت', 886 => 'سراب دوره', 887 => 'فیروزآباد', 888 => 'کونانی', 889 => 'کوهدشت', 890 => 'گراب', 891 => 'معمولان', 892 => 'مومن آباد', 893 => 'نورآباد', 894 => 'ویسیان',), 26 => array(895 => 'احمدسرگوراب', 896 => 'اسالم', 897 => 'اطاقور', 898 => 'املش', 899 => 'آستارا', 900 => 'آستانه اشرفیه', 901 => 'بازار جمعه', 902 => 'بره سر', 903 => 'بندرانزلی', 906 => 'پره سر', 907 => 'تالش', 908 => 'توتکابن', 909 => 'جیرنده', 910 => 'چابکسر', 911 => 'چاف و چمخاله', 912 => 'چوبر', 913 => 'حویق', 914 => 'خشکبیجار', 915 => 'خمام', 916 => 'دیلمان', 917 => 'رانکوه', 918 => 'رحیم آباد', 919 => 'رستم آباد', 920 => 'رشت', 921 => 'رضوانشهر', 922 => 'رودبار', 923 => 'رودبنه', 924 => 'رودسر', 925 => 'سنگر', 926 => 'سیاهکل', 927 => 'شفت', 928 => 'شلمان', 929 => 'صومعه سرا', 930 => 'فومن', 931 => 'کلاچای', 932 => 'کوچصفهان', 933 => 'کومله', 934 => 'کیاشهر', 935 => 'گوراب زرمیخ', 936 => 'لاهیجان', 937 => 'لشت نشا', 938 => 'لنگرود', 939 => 'لوشان', 940 => 'لولمان', 941 => 'لوندویل', 942 => 'لیسار', 943 => 'ماسال', 944 => 'ماسوله', 945 => 'مرجقل', 946 => 'منجیل', 947 => 'واجارگاه',), 27 => array(948 => 'امیرکلا', 949 => 'ایزدشهر', 950 => 'آلاشت', 951 => 'آمل', 952 => 'بابل', 953 => 'بابلسر', 954 => 'بالاده', 955 => 'بهشهر', 956 => 'بهنمیر', 957 => 'پل سفید', 958 => 'تنکابن', 959 => 'جویبار', 960 => 'چالوس', 961 => 'چمستان', 962 => 'خرم آباد', 963 => 'خلیل شهر', 964 => 'خوش رودپی', 965 => 'دابودشت', 966 => 'رامسر', 967 => 'رستمکلا', 968 => 'رویان', 969 => 'رینه', 970 => 'زرگرمحله', 971 => 'زیرآب', 972 => 'ساری', 973 => 'سرخرود', 974 => 'سلمان شهر', 975 => 'سورک', 976 => 'شیرگاه', 977 => 'شیرود', 978 => 'عباس آباد', 979 => 'فریدونکنار', 980 => 'فریم', 981 => 'قائم شهر', 982 => 'کتالم', 983 => 'کلارآباد', 984 => 'کلاردشت', 985 => 'کله بست', 986 => 'کوهی خیل', 987 => 'کیاسر', 988 => 'کیاکلا', 989 => 'گتاب', 990 => 'گزنک', 991 => 'گلوگاه', 992 => 'محمودآباد', 993 => 'مرزن آباد', 994 => 'مرزیکلا', 995 => 'نشتارود', 996 => 'نکا', 997 => 'نور', 998 => 'نوشهر', 1119 => 'سادات شهر',), 28 => array(999 => 'اراک', 1000 => 'آستانه', 1001 => 'آشتیان', 1002 => 'پرندک', 1003 => 'تفرش', 1004 => 'توره', 1005 => 'جاورسیان', 1006 => 'خشکرود', 1007 => 'خمین', 1008 => 'خنداب', 1009 => 'داودآباد', 1010 => 'دلیجان', 1011 => 'رازقان', 1012 => 'زاویه', 1013 => 'ساروق', 1014 => 'ساوه', 1015 => 'سنجان', 1016 => 'شازند', 1017 => 'غرق آباد', 1018 => 'فرمهین', 1019 => 'قورچی باشی', 1020 => 'کرهرود', 1021 => 'کمیجان', 1022 => 'مامونیه', 1023 => 'محلات', 1024 => 'مهاجران', 1025 => 'میلاجرد', 1026 => 'نراق', 1027 => 'نوبران', 1028 => 'نیمور', 1029 => 'هندودر',), 29 => array(1030 => 'ابوموسی', 1031 => 'بستک', 1032 => 'بندرجاسک', 1033 => 'بندرچارک', 1034 => 'بندرخمیر', 1035 => 'بندرعباس', 1036 => 'بندرلنگه', 1037 => 'بیکا', 1038 => 'پارسیان', 1039 => 'تخت', 1040 => 'جناح', 1041 => 'حاجی آباد', 1042 => 'درگهان', 1043 => 'دهبارز', 1044 => 'رویدر', 1045 => 'زیارتعلی', 1046 => 'سردشت', 1047 => 'سندرک', 1048 => 'سوزا', 1049 => 'سیریک', 1050 => 'فارغان', 1051 => 'فین', 1052 => 'قشم', 1053 => 'قلعه قاضی', 1054 => 'کنگ', 1055 => 'کوشکنار', 1056 => 'کیش', 1057 => 'گوهران', 1058 => 'میناب', 1059 => 'هرمز', 1060 => 'هشتبندی',), 30 => array(1061 => 'ازندریان', 1062 => 'اسدآباد', 1063 => 'برزول', 1064 => 'بهار', 1065 => 'تویسرکان', 1066 => 'جورقان', 1067 => 'جوکار', 1068 => 'دمق', 1069 => 'رزن', 1070 => 'زنگنه', 1071 => 'سامن', 1072 => 'سرکان', 1073 => 'شیرین سو', 1074 => 'صالح آباد', 1075 => 'فامنین', 1076 => 'فرسفج', 1077 => 'فیروزان', 1078 => 'قروه درجزین', 1079 => 'قهاوند', 1080 => 'کبودر آهنگ', 1081 => 'گل تپه', 1082 => 'گیان', 1083 => 'لالجین', 1084 => 'مریانج', 1085 => 'ملایر', 1086 => 'نهاوند', 1087 => 'همدان',), 31 => array(1088 => 'ابرکوه', 1089 => 'احمدآباد', 1090 => 'اردکان', 1091 => 'اشکذر', 1092 => 'بافق', 1093 => 'بفروئیه', 1094 => 'بهاباد', 1095 => 'تفت', 1096 => 'حمیدیا', 1097 => 'خضرآباد', 1098 => 'دیهوک', 1099 => 'زارچ', 1100 => 'شاهدیه', 1101 => 'طبس', 1103 => 'عقدا', 1104 => 'مروست', 1105 => 'مهردشت', 1106 => 'مهریز', 1107 => 'میبد', 1108 => 'ندوشن', 1109 => 'نیر', 1110 => 'هرات', 1111 => 'یزد',),); + + + foreach ($states as $state){ + $s = new State(); + $s->name = $state[0]; + $s->lat = $state[1]; + $s->lng = $state[2]; + $s->country = 'Iran'; + $s->save(); + } + + foreach ($cities as $k => $state){ + foreach ($state as $city){ + $c = new City(); + $c->name = $city; + $c->state_id = $k; + $c->save(); + } + } + } +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..7348ef4 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,872 @@ +{ + "name": "xshop2", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "remixicon": "^4.2.0", + "three": "0.150.0", + "vazirmatn": "^33.0.3" + }, + "devDependencies": { + "@popperjs/core": "^2.11.6", + "@vitejs/plugin-vue": "^4.5.0", + "axios": "^1.6.4", + "bootstrap": "^5.2.3", + "laravel-vite-plugin": "^1.0", + "sass": "^1.56.1", + "vite": "^5.0", + "vue": "^3.2.37" + } + }, + "node_modules/@babel/parser": { + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz", + "integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==", + "dev": true, + "license": "MIT", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", + "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.17.2.tgz", + "integrity": "sha512-Hy7pLwByUOuyaFC6mAr7m+oMC+V7qyifzs/nW2OJfC8H4hbCzOX07Ov0VFk/zP3kBsELWNFi7rJtgbKYsav9QQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.17.2.tgz", + "integrity": "sha512-h1+yTWeYbRdAyJ/jMiVw0l6fOOm/0D1vNLui9iPuqgRGnXA0u21gAqOyB5iHjlM9MMfNOm9RHCQ7zLIzT0x11Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@vitejs/plugin-vue": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-4.6.2.tgz", + "integrity": "sha512-kqf7SGFoG+80aZG6Pf+gsZIVvGSCKE98JbiWqcCV9cThtg91Jav0yvYFC9Zb+jKetNGF6ZKeoaxgZfND21fWKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.0.0 || ^5.0.0", + "vue": "^3.2.25" + } + }, + "node_modules/@vue/compiler-core": { + "version": "3.4.26", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.26.tgz", + "integrity": "sha512-N9Vil6Hvw7NaiyFUFBPXrAyETIGlQ8KcFMkyk6hW1Cl6NvoqvP+Y8p1Eqvx+UdqsnrnI9+HMUEJegzia3mhXmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.24.4", + "@vue/shared": "3.4.26", + "entities": "^4.5.0", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.0" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.4.26", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.26.tgz", + "integrity": "sha512-4CWbR5vR9fMg23YqFOhr6t6WB1Fjt62d6xdFPyj8pxrYub7d+OgZaObMsoxaF9yBUHPMiPFK303v61PwAuGvZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/compiler-core": "3.4.26", + "@vue/shared": "3.4.26" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.4.26", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.26.tgz", + "integrity": "sha512-It1dp+FAOCgluYSVYlDn5DtZBxk1NCiJJfu2mlQqa/b+k8GL6NG/3/zRbJnHdhV2VhxFghaDq5L4K+1dakW6cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.24.4", + "@vue/compiler-core": "3.4.26", + "@vue/compiler-dom": "3.4.26", + "@vue/compiler-ssr": "3.4.26", + "@vue/shared": "3.4.26", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.10", + "postcss": "^8.4.38", + "source-map-js": "^1.2.0" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.4.26", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.26.tgz", + "integrity": "sha512-FNwLfk7LlEPRY/g+nw2VqiDKcnDTVdCfBREekF8X74cPLiWHUX6oldktf/Vx28yh4STNy7t+/yuLoMBBF7YDiQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.4.26", + "@vue/shared": "3.4.26" + } + }, + "node_modules/@vue/reactivity": { + "version": "3.4.26", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.26.tgz", + "integrity": "sha512-E/ynEAu/pw0yotJeLdvZEsp5Olmxt+9/WqzvKff0gE67tw73gmbx6tRkiagE/eH0UCubzSlGRebCbidB1CpqZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/shared": "3.4.26" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.4.26", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.26.tgz", + "integrity": "sha512-AFJDLpZvhT4ujUgZSIL9pdNcO23qVFh7zWCsNdGQBw8ecLNxOOnPcK9wTTIYCmBJnuPHpukOwo62a2PPivihqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.4.26", + "@vue/shared": "3.4.26" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.4.26", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.26.tgz", + "integrity": "sha512-UftYA2hUXR2UOZD/Fc3IndZuCOOJgFxJsWOxDkhfVcwLbsfh2CdXE2tG4jWxBZuDAs9J9PzRTUFt1PgydEtItw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/runtime-core": "3.4.26", + "@vue/shared": "3.4.26", + "csstype": "^3.1.3" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.4.26", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.26.tgz", + "integrity": "sha512-xoGAqSjYDPGAeRWxeoYwqJFD/gw7mpgzOvSxEmjWaFO2rE6qpbD1PC172YRpvKhrihkyHJkNDADFXTfCyVGhKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/compiler-ssr": "3.4.26", + "@vue/shared": "3.4.26" + }, + "peerDependencies": { + "vue": "3.4.26" + } + }, + "node_modules/@vue/shared": { + "version": "3.4.26", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.26.tgz", + "integrity": "sha512-Fg4zwR0GNnjzodMt3KRy2AWGMKQXByl56+4HjN87soxLNU9P5xcJkstAlIeEF3cU6UYOzmJl1tV0dVPGIljCnQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bootstrap": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz", + "integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/twbs" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + } + ], + "license": "MIT", + "peerDependencies": { + "@popperjs/core": "^2.11.8" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "dev": true, + "license": "MIT" + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/esbuild": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", + "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.20.2", + "@esbuild/android-arm": "0.20.2", + "@esbuild/android-arm64": "0.20.2", + "@esbuild/android-x64": "0.20.2", + "@esbuild/darwin-arm64": "0.20.2", + "@esbuild/darwin-x64": "0.20.2", + "@esbuild/freebsd-arm64": "0.20.2", + "@esbuild/freebsd-x64": "0.20.2", + "@esbuild/linux-arm": "0.20.2", + "@esbuild/linux-arm64": "0.20.2", + "@esbuild/linux-ia32": "0.20.2", + "@esbuild/linux-loong64": "0.20.2", + "@esbuild/linux-mips64el": "0.20.2", + "@esbuild/linux-ppc64": "0.20.2", + "@esbuild/linux-riscv64": "0.20.2", + "@esbuild/linux-s390x": "0.20.2", + "@esbuild/linux-x64": "0.20.2", + "@esbuild/netbsd-x64": "0.20.2", + "@esbuild/openbsd-x64": "0.20.2", + "@esbuild/sunos-x64": "0.20.2", + "@esbuild/win32-arm64": "0.20.2", + "@esbuild/win32-ia32": "0.20.2", + "@esbuild/win32-x64": "0.20.2" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/immutable": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.5.tgz", + "integrity": "sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/laravel-vite-plugin": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-1.0.2.tgz", + "integrity": "sha512-Mcclml10khYzBVxDwJro8wnVDwD4i7XOSEMACQNnarvTnHjrjXLLL+B/Snif2wYAyElsOqagJZ7VAinb/2vF5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "vite-plugin-full-reload": "^1.1.0" + }, + "bin": { + "clean-orphaned-assets": "bin/clean.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "vite": "^5.0.0" + } + }, + "node_modules/magic-string": { + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true, + "license": "MIT" + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/remixicon": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/remixicon/-/remixicon-4.2.0.tgz", + "integrity": "sha512-MF5wApNveRh3n0iMVM+lr2nSWrj/rBbSD2eWapuD9ReYRGs5naAUR1BqVBCHGqm286FIS6zwwmUf96QjHQ9l4w==", + "license": "Apache-2.0" + }, + "node_modules/rollup": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.17.2.tgz", + "integrity": "sha512-/9ClTJPByC0U4zNLowV1tMBe8yMEAxewtR3cUNX5BoEpGH3dQEWpJLr6CLp0fPdYRF/fzVOgvDb1zXuakwF5kQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.17.2", + "@rollup/rollup-android-arm64": "4.17.2", + "@rollup/rollup-darwin-arm64": "4.17.2", + "@rollup/rollup-darwin-x64": "4.17.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.17.2", + "@rollup/rollup-linux-arm-musleabihf": "4.17.2", + "@rollup/rollup-linux-arm64-gnu": "4.17.2", + "@rollup/rollup-linux-arm64-musl": "4.17.2", + "@rollup/rollup-linux-powerpc64le-gnu": "4.17.2", + "@rollup/rollup-linux-riscv64-gnu": "4.17.2", + "@rollup/rollup-linux-s390x-gnu": "4.17.2", + "@rollup/rollup-linux-x64-gnu": "4.17.2", + "@rollup/rollup-linux-x64-musl": "4.17.2", + "@rollup/rollup-win32-arm64-msvc": "4.17.2", + "@rollup/rollup-win32-ia32-msvc": "4.17.2", + "@rollup/rollup-win32-x64-msvc": "4.17.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/sass": { + "version": "1.76.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.76.0.tgz", + "integrity": "sha512-nc3LeqvF2FNW5xGF1zxZifdW3ffIz5aBb7I7tSvOoNu7z1RQ6pFt9MBuiPtjgaI62YWrM/txjWlOCFiGtf2xpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/three": { + "version": "0.150.0", + "resolved": "https://registry.npmjs.org/three/-/three-0.150.0.tgz", + "integrity": "sha512-12oqqBZom9fb5HtX3rD8qPVnamojuiN5Os7r0x8s3HQ+WHRwnEyzl2XU3aEKocsDkG++rkE9+HWzx77O59NXtw==", + "license": "MIT" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/vazirmatn": { + "version": "33.0.3", + "resolved": "https://registry.npmjs.org/vazirmatn/-/vazirmatn-33.0.3.tgz", + "integrity": "sha512-fbjNc0CMjazZpIegWzz9OHGzI1APFboT+x7ZecXlUCtDe/nkyx7gtCTZnWS/+eeXG7fbfXymCPKJI8EsnM3iqw==", + "license": "OFL" + }, + "node_modules/vite": { + "version": "5.2.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.11.tgz", + "integrity": "sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.20.1", + "postcss": "^8.4.38", + "rollup": "^4.13.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-plugin-full-reload": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vite-plugin-full-reload/-/vite-plugin-full-reload-1.1.0.tgz", + "integrity": "sha512-3cObNDzX6DdfhD9E7kf6w2mNunFpD7drxyNgHLw+XwIYAgb+Xt16SEXo0Up4VH+TMf3n+DSVJZtW2POBGcBYAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "picomatch": "^2.3.1" + } + }, + "node_modules/vue": { + "version": "3.4.26", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.26.tgz", + "integrity": "sha512-bUIq/p+VB+0xrJubaemrfhk1/FiW9iX+pDV+62I/XJ6EkspAO9/DXEjbDFoe8pIfOZBqfk45i9BMc41ptP/uRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.4.26", + "@vue/compiler-sfc": "3.4.26", + "@vue/runtime-dom": "3.4.26", + "@vue/server-renderer": "3.4.26", + "@vue/shared": "3.4.26" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + } + } +} diff --git a/package.json b/package.json index 0a3595c..dd1be3d 100644 --- a/package.json +++ b/package.json @@ -16,8 +16,10 @@ "vue": "^3.2.37" }, "dependencies": { + "leaflet": "^1.9.4", "remixicon": "^4.2.0", "three": "0.150.0", - "vazirmatn": "^33.0.3" + "vazirmatn": "^33.0.3", + "vue-toast-notification": "^3.1.2" } } diff --git a/resources/js/app.js b/resources/js/app.js index 111718d..6b55882 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -63,6 +63,9 @@ app.component('tag-input', TagInput); import SliderData from "./components/SliderData.vue"; app.component('slider-data', SliderData); + +import AddressInput from "./components/AddressInput.vue"; +app.component('address-input', AddressInput); /** * The following block of code may be used to automatically register your * Vue components. It will recursively scan this directory for the Vue diff --git a/resources/js/components/AddressInput.vue b/resources/js/components/AddressInput.vue new file mode 100644 index 0000000..0be29bb --- /dev/null +++ b/resources/js/components/AddressInput.vue @@ -0,0 +1,424 @@ + + + + + diff --git a/resources/js/panel/general-events.js b/resources/js/panel/general-events.js index b38b35e..ef0b1e8 100644 --- a/resources/js/panel/general-events.js +++ b/resources/js/panel/general-events.js @@ -12,4 +12,21 @@ document.querySelectorAll('.delete-confirm')?.forEach(function (el) { e.preventDefault(); } }); -}) +}); + + +window.findUrl = function (name,item = null) { + for (var i = 0; i < window.routesList.length; i++) { + if (window.routesList[i].name === name) { + if (item != null){ + return window.routesList[i].url.split('{item}').join(item); + }else{ + return window.routesList[i].url; + } + } + } + return null; +} + + + diff --git a/resources/sass/app.scss b/resources/sass/app.scss index e72cb9c..e500406 100644 --- a/resources/sass/app.scss +++ b/resources/sass/app.scss @@ -1,6 +1,7 @@ // Fonts @import 'vazirmatn/Vazirmatn-font-face.css'; @import "remixicon/fonts/remixicon.css"; +@import "vue-toast-notification/dist/theme-bootstrap.css"; // Variables @import 'panel/variables'; diff --git a/resources/views/admin/customers/customer-form.blade.php b/resources/views/admin/customers/customer-form.blade.php new file mode 100644 index 0000000..13ff2ee --- /dev/null +++ b/resources/views/admin/customers/customer-form.blade.php @@ -0,0 +1,147 @@ +@extends('admin.templates.panel-form-template') +@section('title') + @if(isset($item)) + {{__("Edit customer")}} [{{$item->name}}] + @else + {{__("Add new customer")}} + @endif - +@endsection +@section('form') + +
+
+ + @include('components.err') +
+

+ + {{__("Tips")}} +

+
    +
  • + {{__("Recommends")}} +
  • +
+
+ @if(isset($item)) +
+

+ + {{__("Addresses")}} +

+ +
+ @endif + +
+
+
+

+ @if(isset($item)) + {{__("Edit customer")}} [{{$item->name}}] + @else + {{__("Add new customer")}} + @endif +

+ +
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+ +
+ + colleague) + checked + @endif> + +
+
+
+
+ + +
+
+
+ + +
+
+ +
+
+
+@endsection diff --git a/resources/views/admin/customers/customer-list.blade.php b/resources/views/admin/customers/customer-list.blade.php new file mode 100644 index 0000000..973e881 --- /dev/null +++ b/resources/views/admin/customers/customer-list.blade.php @@ -0,0 +1,15 @@ +@extends('admin.templates.panel-list-template') + +@section('list-title') + + {{__("Customers list")}} +@endsection +@section('title') + {{__("Customers list")}} - +@endsection +@section('filter') + {{-- Other filters --}} +@endsection +@section('bulk') + {{-- --}} +@endsection diff --git a/resources/views/components/panel-footer.blade.php b/resources/views/components/panel-footer.blade.php index 5fd4d03..31885fc 100644 --- a/resources/views/components/panel-footer.blade.php +++ b/resources/views/components/panel-footer.blade.php @@ -1,6 +1,7 @@ @yield('js-content') diff --git a/resources/views/components/panel-side-navbar.blade.php b/resources/views/components/panel-side-navbar.blade.php index 9d32fce..b196663 100644 --- a/resources/views/components/panel-side-navbar.blade.php +++ b/resources/views/components/panel-side-navbar.blade.php @@ -13,7 +13,7 @@