raheel3031
raheel3031
FFilament
Created by raheel3031 on 9/19/2024 in #❓┊help
foreach loop not working
thisis in the model file
4 replies
FFilament
Created by raheel3031 on 9/19/2024 in #❓┊help
foreach loop not working
public $categories = [];

public function mount()
{
// Fetch categories from the database
$this->categories = Category::all();
}

#[Url]
public $selected_categories = []; // Add this line to manage selected categories

// public $showCategoryFilter = false; // Add this line

//public function toggleCategoryFilter()
//{
// $this->showCategoryFilter = !$this->showCategoryFilter;
//}

public function render() {
$productQuery = Product::query()->where('is_visible', 1);

//'products' => Product::query()
// ->where('is_visible', 1)
// ->when(!empty($this->selectedCategories), function (Builder $query) {
// $query->whereHas('categories', function($query) {
// $query->whereIn('category_id', $this->selectedCategories);
// });
// })
// ->paginate(6),

return view('livewire.products-page', [
'products' => $productQuery->paginate(6),
'brands' => Brand::where('is_visible', 1)->get(['id', 'name', 'slug']),
'categories' => Category::where('is_visible', 1)->get(['id', 'name', 'slug']),
]);
}
}
public $categories = [];

public function mount()
{
// Fetch categories from the database
$this->categories = Category::all();
}

#[Url]
public $selected_categories = []; // Add this line to manage selected categories

// public $showCategoryFilter = false; // Add this line

//public function toggleCategoryFilter()
//{
// $this->showCategoryFilter = !$this->showCategoryFilter;
//}

public function render() {
$productQuery = Product::query()->where('is_visible', 1);

//'products' => Product::query()
// ->where('is_visible', 1)
// ->when(!empty($this->selectedCategories), function (Builder $query) {
// $query->whereHas('categories', function($query) {
// $query->whereIn('category_id', $this->selectedCategories);
// });
// })
// ->paginate(6),

return view('livewire.products-page', [
'products' => $productQuery->paginate(6),
'brands' => Brand::where('is_visible', 1)->get(['id', 'name', 'slug']),
'categories' => Category::where('is_visible', 1)->get(['id', 'name', 'slug']),
]);
}
}
4 replies
FFilament
Created by TegarJK on 9/18/2024 in #❓┊help
Best security practice for filament?
also interested
3 replies
FFilament
Created by raheel3031 on 9/14/2024 in #❓┊help
These credentials do not match our records.
The name column was missing in the table, I added this. And I turned off mustverify. The panel access was for admin only, I changed this to my email.
10 replies
FFilament
Created by raheel3031 on 9/14/2024 in #❓┊help
These credentials do not match our records.
I have solved this
10 replies
FFilament
Created by raheel3031 on 9/14/2024 in #❓┊help
These credentials do not match our records.
No still looking for solution
10 replies
FFilament
Created by raheel3031 on 9/14/2024 in #❓┊help
These credentials do not match our records.
No that didn't work for me
10 replies
FFilament
Created by raheel3031 on 9/13/2024 in #❓┊help
slug is not generated within createOptionForm
The problem is there. I changed !== to === and now it works
7 replies
FFilament
Created by raheel3031 on 9/13/2024 in #❓┊help
slug is not generated within createOptionForm
Funny thing is that the exact code is working in the product resource
7 replies
FFilament
Created by raheel3031 on 9/13/2024 in #❓┊help
slug is not generated within createOptionForm
Anyone?
7 replies
FFilament
Created by raheel3031 on 9/13/2024 in #❓┊help
error: Array to string conversion
this has been solved
10 replies
FFilament
Created by raheel3031 on 9/13/2024 in #❓┊help
error: Array to string conversion
no iam using 10. but somehow the image is not being saved now
10 replies
FFilament
Created by raheel3031 on 9/13/2024 in #❓┊help
error: Array to string conversion
this code?
10 replies
FFilament
Created by raheel3031 on 9/13/2024 in #❓┊help
error: Array to string conversion
protected $casts = [ 'images' => 'array', ];
10 replies
FFilament
Created by raheel3031 on 9/13/2024 in #❓┊help
error: Array to string conversion
where do i place the code?
10 replies
FFilament
Created by raheel3031 on 9/12/2024 in #❓┊help
styling image section in filament form builder
Now it is working. Thanks
11 replies