Add (category)

This commit is contained in:
2023-11-20 02:50:16 +08:00
parent 36f0588ef8
commit 3ed6215b16
3 changed files with 12 additions and 5 deletions

View File

@@ -5,10 +5,10 @@
use App\Models\Category;
use Illuminate\View\View;
class ParentCategoryComposer
class CategoryComposer
{
public function compose(View $view)
{
$view->with('parent_categories', Category::whereNull('parent_id')->get());
$view->with('categories', Category::get());
}
}