Closed robertnicjoo closed 5 years ago
Anyone?
@robertnicjoo it seems like you're getting navbars
rendered instead of navbar
... can you dd($navbar);
before you do a return statement and tell me what the output is?
@msurguy thanks for respond here is my dump result
{{dd($navbar)}}
Collection {#1825 ▼
#items: array:2 [▼
0 => NavbarMenu {#1771 ▼
#fillable: array:5 [▶]
#connection: "mysql"
#table: "navbar_menus"
#primaryKey: "id"
#keyType: "int"
+incrementing: true
#with: []
#withCount: []
#perPage: 15
+exists: true
+wasRecentlyCreated: false
#attributes: array:8 [▶]
#original: array:8 [▼
"id" => 2
"title" => "Who We Are"
"slug" => "#"
"category_id" => null
"parent_id" => null
"order" => 2
"created_at" => "2018-10-23 11:58:12"
"updated_at" => "2018-10-23 11:58:12"
]
#changes: []
#casts: []
#dates: []
#dateFormat: null
#appends: []
#dispatchesEvents: []
#observables: []
#relations: array:1 [▼
"children" => Collection {#1790 ▼
#items: []
}
]
#touches: []
+timestamps: true
#hidden: []
#visible: []
#guarded: array:1 [▶]
}
1 => NavbarMenu {#1772 ▼
#fillable: array:5 [▶]
#connection: "mysql"
#table: "navbar_menus"
#primaryKey: "id"
#keyType: "int"
+incrementing: true
#with: []
#withCount: []
#perPage: 15
+exists: true
+wasRecentlyCreated: false
#attributes: array:8 [▼
"id" => 5
"title" => "Deeps (L.1)"
"slug" => null
"category_id" => null
"parent_id" => null
"order" => 5
"created_at" => "2018-10-23 12:01:32"
"updated_at" => "2018-10-23 12:01:32"
]
#original: array:8 [▶]
#changes: []
#casts: []
#dates: []
#dateFormat: null
#appends: []
#dispatchesEvents: []
#observables: []
#relations: array:1 [▼
"children" => Collection {#1824 ▼
#items: array:1 [▼
0 => NavbarMenu {#1819 ▼
#fillable: array:5 [▶]
#connection: "mysql"
#table: "navbar_menus"
#primaryKey: "id"
#keyType: "int"
+incrementing: true
#with: []
#withCount: []
#perPage: 15
+exists: true
+wasRecentlyCreated: false
#attributes: array:8 [▶]
#original: array:8 [▼
"id" => 6
"title" => "Deeps (L.2)"
"slug" => "#"
"category_id" => null
"parent_id" => 5
"order" => 6
"created_at" => "2018-10-23 12:01:49"
"updated_at" => "2018-10-23 12:01:49"
]
#changes: []
#casts: []
#dates: []
#dateFormat: null
#appends: []
#dispatchesEvents: []
#observables: []
#relations: []
#touches: []
+timestamps: true
#hidden: []
#visible: []
#guarded: array:1 [▶]
}
]
}
]
#touches: []
+timestamps: true
#hidden: []
#visible: []
#guarded: array:1 [▶]
}
]
}
dd($navbar);
"""
\n
<ol class="dd-list">\n
<li class='dd-item nested-list-item' data-order='2' data-id='2'>\n
\t <div class='dd-handle nested-list-handle'>\n
<i class='fas fa-arrows-alt'></i>\n
\t </div>\n
\t <div class='nested-list-content'>Who We Are\n
\t <div class='float-right'>\n
\t <a href='/admin/menusnav/2'>Edit</a> |\n
\t <a href='#' class='delete_toggle text-danger' rel='2'>Delete</a>\n
\t </div>\n
\t </div></li><li class='dd-item nested-list-item' data-order='5' data-id='5'>\n
\t <div class='dd-handle nested-list-handle'>\n
<i class='fas fa-arrows-alt'></i>\n
\t </div>\n
\t <div class='nested-list-content'>Deeps (L.1)\n
\t <div class='float-right'>\n
\t <a href='/admin/menusnav/5'>Edit</a> |\n
\t <a href='#' class='delete_toggle text-danger' rel='5'>Delete</a>\n
\t </div>\n
\t </div>\n
<ol class="dd-list">\n
<li class='dd-item nested-list-item' data-order='6' data-id='6'>\n
\t <div class='dd-handle nested-list-handle'>\n
<i class='fas fa-arrows-alt'></i>\n
\t </div>\n
\t <div class='nested-list-content'>Deeps (L.2)\n
\t <div class='float-right'>\n
\t <a href='/admin/menusnav/6'>Edit</a> |\n
\t <a href='#' class='delete_toggle text-danger' rel='6'>Delete</a>\n
\t </div>\n
\t </div>\n
<ol class="dd-list">\n
<li class='dd-item nested-list-item' data-order='7' data-id='7'>\n
\t <div class='dd-handle nested-list-handle'>\n
<i class='fas fa-arrows-alt'></i>\n
\t </div>\n
\t <div class='nested-list-content'>Deeps (L.3)\n
\t <div class='float-right'>\n
\t <a href='/admin/menusnav/7'>Edit</a> |\n
\t <a href='#' class='delete_toggle text-danger' rel='7'>Delete</a>\n
\t </div>\n
\t </div></li></ol>\n
</li></ol>\n
</li></ol>\n
"""
@msurguy no? nothing?
@msurguy no? nothing?
still waiting :/
This is what I get in return
code
model
controller
and my
blade
Any idea what might cause the problem?