improved Seeders

pull/44/head
A1Gard 4 months ago
parent d879825606
commit 1004ec3bc8

@ -17,8 +17,10 @@ class GfxController extends Controller
foreach ($request->input('gfx',[]) as $key => $gfx){
$g = Gfx::where('key',$key)->first();
$g->value = $gfx;
$g->save();
if ($g != null){
$g->value = $gfx;
$g->save();
}
}
logAdmin(__METHOD__,__CLASS__,null);

@ -11,6 +11,41 @@ use Illuminate\Database\Eloquent\Factories\Factory;
*/
class PostFactory extends Factory
{
public $icons = [
'ri-home-4-line',
'ri-building-line',
'ri-mail-open-line',
'ri-award-line',
'ri-line-chart-line',
'ri-verified-badge-line',
'ri-pie-chart-2-line',
'ri-printer-line',
'ri-service-line',
'ri-chat-1-line',
'ri-compasses-2-line',
'ri-code-s-slash-line',
'ri-phone-line',
'ri-rss-line',
'ri-fingerprint-line',
'ri-trophy-line',
'ri-shopping-cart-line',
'ri-hand-heart-line',
'ri-funds-line',
'ri-heart-2-line',
'ri-map-pin-line',
'ri-notification-2-line',
'ri-alarm-line',
'ri-user-6-line',
'ri-cloudy-2-line',
'ri-key-2-line',
'ri-customer-service-2-line',
'ri-bar-chart-grouped-line',
'ri-survey-line',
'ri-image-circle-line',
'ri-mic-2-line',
'ri-speed-up-line',
];
/**
* Define the model's default state.
*
@ -29,7 +64,8 @@ class PostFactory extends Factory
'hash' => str_pad(dechex(crc32($title)), 8, '0', STR_PAD_LEFT),
'status' => rand(0,1),
'view' => rand(0,999),
'user_id' => User::inRandomOrder()->first()->id,
'user_id' => User::where('id','<',6)->inRandomOrder()->first()->id,
'icon' => $this->icons[rand(0,count($this->icons)-1)],
];
}
}

@ -18,6 +18,7 @@ class PropFactory extends Factory
{
return [
//
'icon' => 'remixicon-line',
];
}
}

@ -17,68 +17,76 @@ class PropSeeder extends Seeder
//
Prop::factory()->create([
'label' => 'رنگ',
'label' => __('Color'),
'name'=>'color',
'type'=>'color',
'options' => '[{"title":"black","value":"#000000"},{"title":"white","value":"#ffffff"},{"title":"rose gold","value":"#be9289"},{"title":"silver","value":"#c0c0c0"},{"title":"gold","value":"#d4af37"}]',
'searchable'=> 0,
'priceable' => 1
'priceable' => 1,
'icon' => 'ri-palette-line',
]);
Prop::factory()->create([
'label' => 'گارانتی',
'label' => __('Warranty'),
'name'=>'warranty',
'type'=>'select',
'options' => '[{"title":"no warranty","value":"-1"},{"title":"Rayan","value":"1"},{"title":"Arian","value":"3"},{"title":"Avajang","value":"4"},{"title":"Sazgar Aragham","value":"5"}]',
'searchable'=> 0,
'priceable' => 1
'priceable' => 1,
'icon' => 'ri-shield-check-line',
]);
Prop::factory()->create([
'label' => 'شبکه ارتباطی',
'label' => __('Network'),
'name'=>'net',
'type'=>'multi',
'options' => '[{"title":"2G","value":"2g"},{"title":"3G","value":"3g"},{"title":"4G","value":"4g"},{"title":"5G","value":"5g"}]',
'searchable'=> 1,
'priceable' => 0
'priceable' => 0,
'icon' => 'ri-signal-tower-line',
]);
Prop::factory()->create([
'label' => 'حافظه داخلی',
'label' => __('Internal storage'),
'name'=>'hdd',
'type'=>'select',
'options' => '[{"title":"16 Gig","value":"16"},{"title":"32 Gig","value":"32"},{"title":"64 gig","value":"64"},{"title":"128 Gig","value":"128"},{"title":"256 G","value":"256"}]',
'searchable'=> 1,
'priceable' => 1
'priceable' => 1,
'icon' => 'ri-hard-drive-3-line',
]);
Prop::factory()->create([
'label' => 'دوربین جلو',
'label' => __('Front camera'),
'name'=>'fcamera',
'type'=>'text',
'options' => '[]',
'searchable'=> 0,
'priceable' => 0
'priceable' => 0,
'icon' => 'ri-camera-3-line',
]);
Prop::factory()->create([
'label' => 'فناوری صفحه‌نمایش',
'label' => __('Display technology'),
'name'=>'lcd',
'type'=>'text',
'options' =>'[]',
'searchable'=> 0,
'priceable' => 0
'priceable' => 0,
'icon' => 'ri-smartphone-line',
]);
Prop::factory()->create([
'label' => 'تعداد سیم کارت',
'label' => __('Sim card count'),
'name'=>'sim',
'type'=>'number',
'options' =>'[]',
'searchable'=> 1,
'priceable' => 0
'priceable' => 0,
'icon' => 'ri-sim-card-2-line',
]);
Prop::factory()->create([
'label' => 'پشتیبانی از کارت حافظه',
'label' => __('Support SD card'),
'name'=>'sdcard',
'type'=>'checkbox',
'options' =>'[]',
'searchable'=> 1,
'priceable' => 0
'priceable' => 0,
'icon' => 'ri-sd-card-line',
]);
Category::where('id',1)->first()->props()->sync(Prop::pluck('id')->toArray());

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 KiB

@ -1,58 +1,368 @@
{
" days ago": "منذ أيام",
" hours ago": "منذ ساعات",
" minutes ago": "منذ دقائق",
" seconds ago": "منذ ثواني",
"$role": "$ دور",
":ADDRESS removed": ": تمت إزالة العنوان",
":COUNT Images uploaded successfully": ":تم تحميل COUNT من الصور بنجاح",
":COUNT items answered successfully": ":تم الرد على COUNT من العناصر بنجاح",
":COUNT items changed status successfully": ": تم تغيير حالة COUNT من العناصر بنجاح",
":COUNT items closed successfully": ":تم إغلاق COUNT من العناصر بنجاح",
":COUNT items deleted successfully": ":تم حذف COUNT من العناصر بنجاح",
":COUNT items drafted successfully": ": تمت صياغة COUNT من العناصر بنجاح",
":COUNT items pending successfully": ":COUNT من العناصر المعلقة بنجاح",
":COUNT items published successfully": ":تم نشر COUNT من العناصر بنجاح",
":COUNT items restored successfully": ": تمت استعادة COUNT من العناصر بنجاح",
":COUNT users role changed to :NEWROLE successfully": ":تم تغيير دور COUNT من المستخدمين إلى :COUNT بنجاح",
"A fresh verification link has been sent to your email address.": "تم إرسال رابط تحقق جديد إلى عنوان بريدك الإلكتروني.",
"Add": "أضف",
"Add another one": "أضف واحدًا آخر",
"Add cover to better results": "أضف غطاء لنتائج أفضل",
"Add new adv": "إضافة إعلان جديد",
"Add new attachment": "إضافة مرفق جديد",
"Add new category": "إضافة تصنيف جديد",
"Add new city": "إضافة مدينة جديدة",
"Add new clip": "إضافة مقطع جديد",
"Add new comment": "إضافة تعليق جديد",
"Add new contact": "إضافة جهة اتصال جديدة",
"Add new customer": "إضافة عميل جديد",
"Add new discount": "إضافة خصم جديد",
"Add new gallery": "إضافة معرض جديد",
"Add new group": "إضافة مجموعة جديدة",
"Add new language": "إضافة لغة جديدة",
"Add new post": "إضافة مشاركة جديدة",
"Add new product": "إضافة منتج جديد",
"Add new prop": "إضافة دعامة جديدة",
"Add new question": "إضافة سؤال جديد",
"Add new setting": "إضافة إعداد جديد",
"Add new slider": "إضافة شريط تمرير جديد",
"Add new state": "إضافة حالة جديدة",
"Add new ticket": "إضافة تذكرة جديدة",
"Add new transport": "إضافة وسيلة نقل جديدة",
"Add new user": "إضافة مستخدم جديد",
"Add to setting": "أضف إلى الإعداد",
"Added by:": "أضيفت بواسطة :",
"Additional data": "بيانات إضافية",
"Address added to :CUSTOMER": "تم إضافة العنوان إلى :CUSTOMER",
"Addresses": "العناوين",
"Advertise": "أعلن",
"Advs list": "قائمة الإعلانات",
"Amount": "المبلغ",
"Answer": "الإجابة",
"Answered": "تمت الإجابة",
"Approve": "موافقة",
"Approved": "تمت الموافقة",
"Area design": "تصميم المنطقة",
"yesterday": "أمس"
" days ago": "منذ أيام",
" hours ago": "منذ ساعات",
" minutes ago": "منذ دقائق",
" seconds ago": "منذ ثواني",
"$role": "$ دور",
":ADDRESS removed": ": تمت إزالة العنوان",
":COUNT Images uploaded successfully": ":تم تحميل COUNT من الصور بنجاح",
":COUNT items answered successfully": ":تم الرد على COUNT من العناصر بنجاح",
":COUNT items changed status successfully": ": تم تغيير حالة COUNT من العناصر بنجاح",
":COUNT items closed successfully": ":تم إغلاق COUNT من العناصر بنجاح",
":COUNT items deleted successfully": ":تم حذف COUNT من العناصر بنجاح",
":COUNT items drafted successfully": ": تمت صياغة COUNT من العناصر بنجاح",
":COUNT items pending successfully": ":COUNT من العناصر المعلقة بنجاح",
":COUNT items published successfully": ":تم نشر COUNT من العناصر بنجاح",
":COUNT items restored successfully": ": تمت استعادة COUNT من العناصر بنجاح",
":COUNT users role changed to :NEWROLE successfully": ":تم تغيير دور COUNT من المستخدمين إلى :COUNT بنجاح",
"A fresh verification link has been sent to your email address.": "تم إرسال رابط تحقق جديد إلى عنوان بريدك الإلكتروني.",
"AI translate form original source": "",
"API error!": "",
"Add": "أضف",
"Add another one": "أضف واحدًا آخر",
"Add cover to better results": "أضف غطاء لنتائج أفضل",
"Add new adv": "إضافة إعلان جديد",
"Add new attachment": "إضافة مرفق جديد",
"Add new category": "إضافة تصنيف جديد",
"Add new city": "إضافة مدينة جديدة",
"Add new clip": "إضافة مقطع جديد",
"Add new comment": "إضافة تعليق جديد",
"Add new contact": "إضافة جهة اتصال جديدة",
"Add new customer": "إضافة عميل جديد",
"Add new discount": "إضافة خصم جديد",
"Add new gallery": "إضافة معرض جديد",
"Add new group": "إضافة مجموعة جديدة",
"Add new language": "إضافة لغة جديدة",
"Add new post": "إضافة مشاركة جديدة",
"Add new product": "إضافة منتج جديد",
"Add new prop": "إضافة دعامة جديدة",
"Add new question": "إضافة سؤال جديد",
"Add new setting": "إضافة إعداد جديد",
"Add new slider": "إضافة شريط تمرير جديد",
"Add new state": "إضافة حالة جديدة",
"Add new ticket": "إضافة تذكرة جديدة",
"Add new transport": "إضافة وسيلة نقل جديدة",
"Add new user": "إضافة مستخدم جديد",
"Add to setting": "أضف إلى الإعداد",
"Added by:": "أضيفت بواسطة :",
"Additional data": "بيانات إضافية",
"Address added to :CUSTOMER": "تم إضافة العنوان إلى :CUSTOMER",
"Addresses": "العناوين",
"Advertise": "أعلن",
"Advs list": "قائمة الإعلانات",
"Amount": "المبلغ",
"Answer": "الإجابة",
"Answer: <br>": "",
"Answered": "تمت الإجابة",
"Approve": "موافقة",
"Approved": "تمت الموافقة",
"Area design": "تصميم المنطقة",
"As you wished created successfully": "",
"As you wished deattached successfully": "",
"As you wished removed successfully": "",
"As you wished restored successfully": "",
"As you wished sort saved": "",
"As you wished updated successfully": "",
"Attaching": "",
"Attachments": "",
"Attachments list": "",
"Background image": "",
"Base price": "",
"Basic data": "",
"Batch delete": "",
"Batch restore": "",
"Before proceeding, please check your email for a verification link.": "",
"Bulk actions:": "",
"Catalog": "",
"Categories": "",
"Categories list": "",
"Category": "",
"Category name": "",
"Category slug": "",
"Change latitude and longitude": "",
"Check all": "",
"Cities list": "",
"City": "",
"Click here to upload or drag and drop here": "",
"Clips list": "",
"Close": "",
"Code": "",
"Colleague": "",
"Command ignored, segment part exists!": "",
"Comment": "",
"Comment :STATUS": "",
"Comment replay": "",
"Commentator": "",
"Comments": "",
"Confirm Password": "",
"Contact us": "",
"Contacts list": "",
"Contents": "",
"Country": "",
"Cover": "",
"Credit": "",
"Customers": "",
"Customers list": "",
"Dashboard": "",
"Date": "",
"Deattach": "",
"Default": "",
"Description": "",
"Description Table": "",
"Description Text": "",
"Design": "",
"Design :AREA": "",
"Devices": "",
"Discount code": "",
"Discount data": "",
"Discounts": "",
"Discounts list": "",
"Do it": "",
"Double click on image to change index image": "",
"Download": "",
"Download json file": "",
"Draft": "",
"E-mail is unique each users": "",
"Edit": "",
"Edit adv": "",
"Edit attachment": "",
"Edit category": "",
"Edit city": "",
"Edit clip": "",
"Edit comment": "",
"Edit contact": "",
"Edit customer": "",
"Edit discount": "",
"Edit gallery": "",
"Edit group": "",
"Edit language": "",
"Edit post": "",
"Edit product": "",
"Edit prop": "",
"Edit question": "",
"Edit slider": "",
"Edit state": "",
"Edit ticket": "",
"Edit transport": "",
"Edit user": "",
"Email": "",
"Email Address": "",
"Emoji": "",
"Excerpt": "",
"Expire": "",
"Expire date": "",
"Expire date": "",
"False": "",
"Feature image": "",
"File": "",
"File ext": "",
"File name": "",
"File size": "",
"Flag": "",
"Forgot Your Password?": "",
"From - To": "",
"GFX of website updated": "",
"Galleries": "",
"Galleries list": "",
"Graphic": "",
"Group Parent": "",
"Group name": "",
"Group slug": "",
"Groups": "",
"Groups list": "",
"Icon": "",
"If not choose expire expire time will be unlimited": "",
"If you did not receive the email": "",
"If you want to change the password, choose both the same. Otherwise, leave the password field blank.": "",
"If you want to only attach to other staff members and do not want to appear in the website attachment list, uncheck `fillable`": "",
"Image": "",
"Image deleted successfully": "",
"Image uploaded successfully": "",
"Images": "",
"Index image": "",
"Information": "",
"Interaction": "",
"Invalid area segment": "",
"Invalid json file!": "",
"Invalid morph": "",
"Invoices": "",
"Is default": "",
"Is effective price?": "",
"Is fillable": "",
"Key": "",
"Label": "",
"Languages": "",
"Languages list": "",
"Last month visitors devices": "",
"Last week orders": "",
"Latitude": "",
"Link": "",
"Login": "",
"Logout": "",
"Logs of admins": "",
"Logs of guests": "",
"Longitude": "",
"Main group": "",
"Main language content": "",
"Main product category": "",
"Managing": "",
"Max click": "",
"Max click zero is unlimited": "",
"Medias": "",
"Menus": "",
"Message": "",
"Message replay": "",
"Mobile": "",
"Model": "",
"Name": "",
"Name and lastname": "",
"Need process orders": "",
"Next": "",
"No parent": "",
"Not required": "",
"Orders": "",
"Password": "",
"Pending": "",
"Pending tickets": "",
"Pin": "",
"Please confirm your password before continuing.": "",
"Please upload file": "",
"Post": "",
"Post Text": "",
"Post reply": "",
"Posts": "",
"Posts list": "",
"Preview": "",
"Previous": "",
"Price": "",
"Product": "",
"Products": "",
"Products list": "",
"Properties meta": "",
"Props list": "",
"Publish": "",
"Published": "",
"Purchase price": "",
"Question": "",
"Question for:": "",
"Question\/Message": "",
"Questions": "",
"Questions list": "",
"RTL": "",
"Read more": "",
"Recommends": "",
"Register": "",
"Reject": "",
"Rejected": "",
"Remember Me": "",
"Remove": "",
"Reply": "",
"Reply comment": "",
"Reply message...": "",
"Reports": "",
"Required": "",
"Reset Password": "",
"Restore": "",
"Role": "",
"Role filter": "",
"SKU": "",
"Save": "",
"Save all settings": "",
"Search": "",
"Search & Filter": "",
"Searchable": "",
"Section": "",
"Sections": "",
"Send Answer": "",
"Send Answer and close": "",
"Send Password Reset Link": "",
"Set": "",
"Setting": "",
"Setting added to website": "",
"Setting of website updated": "",
"Shopping card": "",
"Show": "",
"Show list": "",
"Size": "",
"Slider": "",
"Slider data": "",
"Sliders list": "",
"Slug": "",
"Sort": "",
"State": "",
"States": "",
"States list": "",
"Status": "",
"Stock quantity": "",
"Subject": "",
"Subtitle": "",
"Tag": "",
"Tags": "",
"Tags, Press enter": "",
"The first and\/or second image will be index image": "",
"Theme": "",
"Theme part created successfully: [blade, js, json, scss, php, assets, screenshot]": "",
"There is nothing to show!": "",
"There is noting file to show!": "",
"Tickets": "",
"Tickets list": "",
"Tips": "",
"Title": "",
"Titles updated": "",
"Toggle navigation": "",
"Toggle selection": "",
"Totol": "",
"Translate": "",
"Translate model": "",
"Translate updated": "",
"Translate with AI": "",
"Translated by ai xstack service :TAG": "",
"Transports": "",
"Transports list": "",
"Trashed": "",
"Trashed items": "",
"True": "",
"Type": "",
"Unit": "",
"Unknown bulk action : :ACTION": "",
"Upload file": "",
"Upload images": "",
"Upload new images": "",
"User filter": "",
"Users": "",
"Users list": "",
"Value": "",
"Verify Your Email Address": "",
"Video clip": "",
"Video clips": "",
"Visitors": "",
"Visits": "",
"We recommending add title each images": "",
"Welcome back": "",
"Width": "",
"You can add images after create gallery": "",
"You can choose more than image to upload": "",
"You can choose one or more image together": "",
"You can create \/ edit clip as draft, publish it when you want": "",
"You can leave the slug empty; it will be generated automatically.": "",
"Your Email sent": "",
"a minute ago": "",
"address updated": "",
"an hour ago": "",
"approved": "",
"area :NAME of website updated": "",
"click here to request another": "",
"emoji": "",
"image": "",
"jpg": "",
"last month visits": "",
"minute": "",
"not searchable": "",
"one second ago": "",
"password repeat": "",
"pending": "",
"rejected": "",
"webp": "",
"xShop": "",
"yesterday": "أمس"
}

@ -16,6 +16,8 @@
":COUNT items restored successfully": ":COUNT مورد بازیافت شد",
":COUNT users role changed to :NEWROLE successfully": ":COUNT کاربر نقش‌شان به :NEWROLE تغییر داده شد ",
"A fresh verification link has been sent to your email address.": "یک پیوند تازه به رایانه شما جهت تایید ارسال شد",
"AI translate form original source": "ترجمه به کمک هوش مصنوعی از منبع اصلی",
"API error!": "خطای API",
"Add": "افزودن",
"Add another one": "افزودن یک مورد دیگر",
"Add cover to better results": "یک کاور جهت بهتر شدن نتایج اضافه کنید",
@ -110,6 +112,7 @@
"Description Text": "نوشته توضیحات",
"Design": "طراحی",
"Design :AREA": "طراحی :AREA",
"Devices": "دستگاه‌ها",
"Discount code": "کد تخفیف",
"Discount data": "اطلاعات تخفیف",
"Discounts": "تخفیف‌ها",
@ -117,7 +120,7 @@
"Do it": "انجام بده",
"Double click on image to change index image": "برای تغییر تصویر شاخص روی آن جفت کلیک کنید",
"Download": "بارگیری",
"Download json file": "",
"Download json file": "بارگیری فایل JSON",
"Draft": "پیش‌نویس",
"E-mail is unique each users": "رایانامه هر کاربر یکتا است",
"Edit": "ویرایش",
@ -190,6 +193,8 @@
"Label": "برچسب",
"Languages": "زبان‌ها",
"Languages list": "فهرست زبان‌ها",
"Last month visitors devices": "",
"Last week orders": "سفارشات هفته پیشین",
"Latitude": "عرض جغرافیایی",
"Link": "پیوند",
"Login": "ورود",
@ -198,6 +203,7 @@
"Logs of guests": "فعالیت میهمان‌ها",
"Longitude": "طول جغرافیایی",
"Main group": "سرفصل اصلی",
"Main language content": "زبان اصلی محتوا",
"Main product category": "دسته اصلی محصول",
"Managing": "مدیریت",
"Max click": "حداکثر کلیک",
@ -210,17 +216,21 @@
"Model": "ماژول",
"Name": "نام",
"Name and lastname": "نام و نام‌خانوادگی",
"Need process orders": "سفارشات نیازمند رسیدگی",
"Next": "بعدی",
"No parent": "بدون والد",
"Not required": "غیر ضرروری",
"Orders": "سفارشاات",
"Password": "گذرواژه",
"Pending": "معلق",
"Pending tickets": "تیکت‌های بی‌پاسخ",
"Pin": "سنجاق",
"Please confirm your password before continuing.": "لطفا پیش از ادامه گذرواژه خود را تایید کنید",
"Please upload file": "لطفا یک پرونده بارگزاری کنید",
"Post": "نوشته",
"Post Text": "متن نوشته",
"Post reply": "پاسخ نوشته",
"Posts": "نوشته‌ها",
"Posts list": "فهرست نوشته‌ها",
"Preview": "پیش‌نمایش",
"Previous": "قبلی",
@ -239,6 +249,7 @@
"Questions": "سوالات",
"Questions list": "فهرست سوالات",
"RTL": "راست به چپ",
"Read more": "اطلاعات بیشتر",
"Recommends": "توصیه‌ها",
"Register": "ثبت‌نام",
"Reject": "رد کردن",
@ -301,8 +312,11 @@
"Toggle navigation": "",
"Toggle selection": "برعکس کردن انتخاب",
"Totol": "همه",
"Translate updated": "",
"Translate with AI": "",
"Translate": "ترجمه",
"Translate model": "ترجمه ماژول",
"Translate updated": "ترجمه افزوده شد",
"Translate with AI": "ترجمه با هوش مصنوعی",
"Translated by ai xstack service :TAG": "ترجمه با هوش مصنوعی xstack به :TAG ",
"Transports": "حمل و نقل‌ها",
"Transports list": "فهرست حمل و نقل‌ها",
"Trashed": "حذف شده‌ها",
@ -317,10 +331,14 @@
"User filter": "صافی کاربر",
"Users": "کاربران",
"Users list": "فهرست کاربران",
"Value": "مقدار",
"Verify Your Email Address": "رایانامه خود را تایید کنید",
"Video clip": "کلیپ",
"Video clips": "کلیپ‌ها",
"Visitors": "بازدیدکنندگان",
"Visits": "بازدید‌ها",
"We recommending add title each images": "به شما پیشنهاد می‌کنیم که برای هر تصویر یک عنوان اضافه کنید",
"Welcome back": "خوش آمدید",
"Width": "عرض",
"You can add images after create gallery": "شما می‌توانید بعد از ساختن گالری به آن تصویر اضافه کنید",
"You can choose more than image to upload": "شما متوانید تصاویری بیشتری برای بارگزاری انتخاب کنید",
@ -337,6 +355,7 @@
"emoji": "ایموجی",
"image": "تصویر",
"jpg": "",
"Last month visits": "بازدیدها واپسین ماه",
"minute": "دقیق",
"not searchable": "غیرقابل جستجو",
"one second ago": "یک ثانیه پیش",
@ -346,4 +365,4 @@
"webp": "",
"xShop": "",
"yesterday": "دیروز"
}
}

@ -102,7 +102,7 @@
<div class="card skewed-container">
<i class="ri-bar-chart-box-line skewed-icon"></i>
<div class="card-header">
{{__("last month visits")}}
{{__("Last month visits")}}
</div>
<div class="card-body">
<canvas id="visitor-chart"></canvas>

Loading…
Cancel
Save