Compare commits

..

No commits in common. 'f5a2f3dc67ffe362e81d4afad506a05c87d32784' and '2a7714845bb7b1d6a25e69ff907b83b29458a557' have entirely different histories.

@ -73,15 +73,6 @@ php artisan seeding:image Product digital
``` ```
</div> </div>
یا برای همه مدل‌ها یک‌جا از دستور زیر استفاده کنید:
<div dir="ltr">
```bash
php artisan seeding:all digital
```
</div>
> شما ابتدا باید مدل را نوشته و سپس فولدر مورد نظر برای تصاویر را وارد کنید[bag, clothe, digital, sport, posts, makeup] > شما ابتدا باید مدل را نوشته و سپس فولدر مورد نظر برای تصاویر را وارد کنید[bag, clothe, digital, sport, posts, makeup]
> همچنین می‌توانید یک پوشه درخواه پر از تصاویر jpg دلخواه را در آن پر کنید > همچنین می‌توانید یک پوشه درخواه پر از تصاویر jpg دلخواه را در آن پر کنید

@ -55,17 +55,9 @@ php artisan seeding:prepare
``` ```
- nor copy your image folder to `database/seeders/images/` - nor copy your image folder to `database/seeders/images/`
- then: Seeding image for models: [Group, Category, Post, Product, Slider] - then: Seeding image for models: [Group, Category, Post, Product, Slider]
```bash ```bash
php artisan seeding:image Product digital php artisan seeding:image Product digital
``` ```
Or to seed all models:
```bash
php artisan seeding:all digital
```
> First parameter is Model, Second is image seeder directory available [bag, clothe, digital, sport, posts, makeup] > First parameter is Model, Second is image seeder directory available [bag, clothe, digital, sport, posts, makeup]
> You can create your directory and put your image into new directory then use image seeder > You can create your directory and put your image into new directory then use image seeder

@ -1,48 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class SeedImageAll extends Command
{
public $models = ['Category', 'Group', 'Slider', 'Post', 'Product'];
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'seeding:all {directory}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Execute the console command.
*/
public function handle()
{
//
foreach ($this->models as $model) {
// Call the seeder command
$exitCode = \Artisan::call('seeding:image', ['directory' => $this->argument('directory'), 'model' => $model]);
// Get the output
$output = \Artisan::output();
// Handle the exit code and output as needed
if ($exitCode === 0) {
$this->info( "Seeding was successful: [$model] \n");
} else {
$this->error("Seeding failed with exit code {$exitCode}:\n");
}
$this->info( $output);
}
}
}

@ -225,7 +225,6 @@ class AreaController extends Controller
public function build(){ public function build(){
$exitCode = \Artisan::call('client');
$exitCode = \Artisan::call('build'); $exitCode = \Artisan::call('build');
// Get the command output from cache // Get the command output from cache

@ -343,7 +343,6 @@
"Needs Improvement": "نیازمند بهینه‌تر شدن", "Needs Improvement": "نیازمند بهینه‌تر شدن",
"Next": "بعدی", "Next": "بعدی",
"No parent": "بدون والد", "No parent": "بدون والد",
"Not available": "نا موجود",
"Not required": "غیر ضرروری", "Not required": "غیر ضرروری",
"Order removed successfully": "سفارش با موفقیت حذف شد", "Order removed successfully": "سفارش با موفقیت حذف شد",
"Orders": "سفارشاات", "Orders": "سفارشاات",

@ -71,32 +71,22 @@
</p> </p>
</div> </div>
<div class="mt-4">&nbsp;</div> <div class="mt-4">&nbsp;</div>
@if($product->stock_status == 'IN_STOCK') @if($product->quantities()->count()>0)
<quantities-add-to-card
@if($product->quantities()->count()>0) :qz='@json($product->quantities)'
<quantities-add-to-card :props='@json(usableProp($product->category->props))'
:qz='@json($product->quantities)' currency="{{config('app.currency.symbol')}}"
:props='@json(usableProp($product->category->props))' card-link="{{ route('client.product-card-toggle',$product->slug) }}"
currency="{{config('app.currency.symbol')}}" :translate='@json(['add-to-card' => __('Add to card')])'
card-link="{{ route('client.product-card-toggle',$product->slug) }}" @if($product->hasDiscount())
:translate='@json(['add-to-card' => __('Add to card')])' :discount='@json($product->activeDiscounts()->first())'
@if($product->hasDiscount()) @endif
:discount='@json($product->activeDiscounts()->first())' ></quantities-add-to-card>
@endif
></quantities-add-to-card>
@else
<a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-outline-primary add-to-card btn-lg">
<i class="ri-shopping-bag-3-line"></i>
{{__("Add to card")}}
</a>
@endif
@else @else
<a <a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-primary disabled"> class="btn btn-outline-primary add-to-card btn-lg">
<i class="ri-shopping-bag-3-line"></i> <i class="ri-shopping-bag-3-line"></i>
{{__("Not available")}} {{__("Add to card")}}
</a> </a>
@endif @endif
<div class="mt-4">&nbsp;</div> <div class="mt-4">&nbsp;</div>

@ -111,32 +111,22 @@
</a> </a>
<div class="mt-1">&nbsp;</div> <div class="mt-1">&nbsp;</div>
@if($product->stock_status == 'IN_STOCK') @if($product->quantities()->count()>0)
<quantities-add-to-card
@if($product->quantities()->count()>0) :qz='@json($product->quantities)'
<quantities-add-to-card :props='@json(usableProp($product->category->props))'
:qz='@json($product->quantities)' currency="{{config('app.currency.symbol')}}"
:props='@json(usableProp($product->category->props))' card-link="{{ route('client.product-card-toggle',$product->slug) }}"
currency="{{config('app.currency.symbol')}}" :translate='@json(['add-to-card' => __('Add to card')])'
card-link="{{ route('client.product-card-toggle',$product->slug) }}" @if($product->hasDiscount())
:translate='@json(['add-to-card' => __('Add to card')])' :discount='@json($product->activeDiscounts()->first())'
@if($product->hasDiscount()) @endif
:discount='@json($product->activeDiscounts()->first())' ></quantities-add-to-card>
@endif
></quantities-add-to-card>
@else
<a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-outline-primary add-to-card btn-lg">
<i class="ri-shopping-bag-3-line"></i>
{{__("Add to card")}}
</a>
@endif
@else @else
<a <a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-primary disabled"> class="btn btn-outline-primary add-to-card btn-lg">
<i class="ri-shopping-bag-3-line"></i> <i class="ri-shopping-bag-3-line"></i>
{{__("Not available")}} {{__("Add to card")}}
</a> </a>
@endif @endif
</div> </div>

@ -49,33 +49,25 @@
@endif @endif
</div> </div>
<br> <br>
@if($product->stock_status == 'IN_STOCK') @if($product->quantities()->count()>0)
<quantities-add-to-card
@if($product->quantities()->count()>0) :qz='@json($product->quantities)'
<quantities-add-to-card :props='@json(usableProp($product->category->props))'
:qz='@json($product->quantities)' currency="{{config('app.currency.symbol')}}"
:props='@json(usableProp($product->category->props))' card-link="{{ route('client.product-card-toggle',$product->slug) }}"
currency="{{config('app.currency.symbol')}}" :translate='@json(['add-to-card' => __('Add to card')])'
card-link="{{ route('client.product-card-toggle',$product->slug) }}" @if($product->hasDiscount())
:translate='@json(['add-to-card' => __('Add to card')])' :discount='@json($product->activeDiscounts()->first())'
@if($product->hasDiscount()) @endif
:discount='@json($product->activeDiscounts()->first())' ></quantities-add-to-card>
@endif @else
></quantities-add-to-card> <div class="text-center">
@else
<a href="{{ route('client.product-card-toggle',$product->slug) }}" <a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-outline-primary add-to-card btn-lg"> class="btn btn-outline-primary add-to-card btn-lg">
<i class="ri-shopping-bag-3-line"></i> <i class="ri-shopping-bag-3-line"></i>
{{__("Add to card")}} {{__("Add to card")}}
</a> </a>
@endif </div>
@else
<a
class="btn btn-primary disabled">
<i class="ri-shopping-bag-3-line"></i>
{{__("Not available")}}
</a>
@endif @endif
<h4> <h4>
{{__("Description")}} {{__("Description")}}

@ -27,19 +27,11 @@
</span> </span>
</div> </div>
<div class="p-2"> <div class="p-2">
@if($product->stock_status == 'IN_STOCK') <a href="{{ route('client.product-card-toggle',$product->slug) }}"
<a href="{{ route('client.product-card-toggle',$product->slug) }}" class="btn btn-outline-primary w-100 add-to-card">
class="btn btn-primary add-to-card"> <i class="ri-shopping-bag-3-line"></i>
<i class="ri-shopping-bag-3-line"></i> {{__("Add to card")}}
{{__("Add to card")}} </a>
</a>
@else
<a
class="btn btn-primary disabled">
<i class="ri-shopping-bag-3-line"></i>
{{__("Not available")}}
</a>
@endif
</div> </div>
</a> </a>
</div> </div>

@ -4,19 +4,11 @@
<img src="{{$product->thumbUrl2()}}" class="img-2" alt="{{$product->name}}" loading="lazy"> <img src="{{$product->thumbUrl2()}}" class="img-2" alt="{{$product->name}}" loading="lazy">
<div class=""> <div class="">
<div class="btns"> <div class="btns">
@if($product->stock_status == 'IN_STOCK') <a href="{{ route('client.product-card-toggle',$product->slug) }}"
<a href="{{ route('client.product-card-toggle',$product->slug) }}" class="btn btn-primary add-to-card">
class="btn btn-primary add-to-card"> <i class="ri-shopping-bag-3-line"></i>
<i class="ri-shopping-bag-3-line"></i> {{__("Add to card")}}
{{__("Add to card")}} </a>
</a>
@else
<a
class="btn btn-primary disabled">
<i class="ri-shopping-bag-3-line"></i>
{{__("Not available")}}
</a>
@endif
<a class="btn btn-outline-dark compare-btn text-dark" data-slug="{{$product->slug}}" <a class="btn btn-outline-dark compare-btn text-dark" data-slug="{{$product->slug}}"
data-bs-custom-class="custom-tooltip" data-bs-custom-class="custom-tooltip"
data-bs-toggle="tooltip" data-bs-placement="top" data-bs-toggle="tooltip" data-bs-placement="top"

@ -27,19 +27,11 @@
</span> </span>
</div> </div>
<div class="p-2"> <div class="p-2">
@if($product->stock_status == 'IN_STOCK') <a href="{{ route('client.product-card-toggle',$product->slug) }}"
<a href="{{ route('client.product-card-toggle',$product->slug) }}" class="btn btn-outline-primary w-100 add-to-card">
class="btn btn-primary add-to-card"> <i class="ri-shopping-bag-3-line"></i>
<i class="ri-shopping-bag-3-line"></i> {{__("Add to card")}}
{{__("Add to card")}} </a>
</a>
@else
<a
class="btn btn-primary disabled">
<i class="ri-shopping-bag-3-line"></i>
{{__("Not available")}}
</a>
@endif
</div> </div>
</a> </a>
</section> </section>

Loading…
Cancel
Save