Can Anyone help me with Select Tree plugin!!

Hello I'm new here and first time I'm creating help post so please forgive me if i made any mistake So my problem Is when I trying to create categories it shows Unknown column 'categories' in 'field list'
so when I do it manually usually i create product first then attach category in there! here is my code Schema::create('category_product', function (Blueprint $table) { $table->foreignId('product_id')->constrained('products')->cascadeOnDelete(); $table->foreignId('category_id')->constrained('categories')->cascadeOnDelete(); }); public function categories() { return $this->belongsToMany(Category::class, 'category_product'); } Section::make('meta')->schema([ FileUpload::make('thumbnail')->disk('products'), SelectTree::make('categories') ->relationship('categories', 'name', 'parent_id'), Checkbox::make('is_active'), ])->columnSpan(1),
Solution:
If Anyone was interested the solution was to add -> dehydrated(false) in the field...
Jump to solution
3 Replies
Dennis Koch
Dennis Koch6mo ago
Check the plugin channel #codewithdennis-select-tree
Nick Ruddra
Nick RuddraOP6mo ago
Okey ! Sorry I didn't know there Is channel related to plugins
Solution
Nick Ruddra
Nick Ruddra6mo ago
If Anyone was interested the solution was to add -> dehydrated(false) in the field
Want results from more Discord servers?
Add your server