Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Admin Navigation #26

Closed
bpocallaghan opened this issue Apr 25, 2018 · 6 comments
Closed

Add Admin Navigation #26

bpocallaghan opened this issue Apr 25, 2018 · 6 comments
Assignees

Comments

@bpocallaghan
Copy link
Owner

Hi @truelogicapp

Thank your trying out this package.

You've created the new menu item (admin - settings - navigation)
Then the new menu item appeared on the left and you clicked on it... - and now the error...
I am sure you know this - but any admin navigation - needs a Controller / Model / Views and defined in the routes/web.php for it to work.

Only the Website's Pages - can be managed from the admin via the page builder...

Just want to check in before going further... :)

@truelogicapp
Copy link

Hi @bpocallaghan

Yes i created Controller in app\Http\Controllers\Admin Folder
models in \app\Models
View in resources\views\admin
and added routes in Web.php

but when i run my custom Link then i am getting following Error

"Undefined variable: selectedNavigation (View: C:\xampp\htdocs\udrive2.0\resources\views\admin\partials\info.blade.php)

but if i remove @include('admin.partials.info') then get following Error

"Undefined variable: HTMLDescription (View: C:\xampp\htdocs\udrive2.0\resources\views\layouts\admin.blade.php) (View: C:\xampp\htdocs\udrive2.0\resources\views\l ▶"

I am not getting $selectedNavigationId in ValidateRole Middleware

I am sure missing some step. Please guide me

Thanks!

@bpocallaghan
Copy link
Owner Author

bpocallaghan commented Apr 25, 2018

Hi @truelogicapp
How does your controller look like.
Or more specifically - how do you return the view response.
As you will notice. All the admin controller extends the AdminController and the functions return the view like return $this->view('path.to.view');
All those 'extra' variables like the selectedNavigation / htmlDescription, etc - will be passed to the view from the parent view() which is in the AdminController actually believe it goes down one more - but not important right now :)

Mind having a looksy there and see if we can narrow it down :)

@truelogicapp
Copy link

Hi @bpocallaghan

I was missing $this->view

but now attached error

image

@truelogicapp
Copy link

@bpocallaghan my Request not accessible in ValidateRole Middleware. when i try to print $selectedNavigationId the other navigation link printing that

@bpocallaghan
Copy link
Owner Author

bpocallaghan commented Apr 25, 2018

If you want - you can add me to skype to help you? "bpocallaghan" - my skype name.

The problem is in TitanAdminController line 217 - can do a dd($this->selectedNavigation); - however that file is under the vendor directory - but should find it doing a search filename.

For some reason its not finding the navigation - just would like to see why it does not find it - have a feeling its usually something to do with the navigation_admin table or app url or something else.

If you want to have a read here / for reference
While waiting for me to respond next Issue #5

@truelogicapp
Copy link

Hi @bpocallaghan

I did same but in my case when I dd ($configuration) then #connection: null

else in other default controller it showing mysql

I am still not able to access model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants