bpocallaghan / laravel-admin-starter

A Laravel Admin Starter project with Page Builder, Roles, Impersonation, Analytics, Blog, News, Banners, FAQ, Testimonials and more
http://bpocallaghan.co.za
337 stars 92 forks source link

navigation_admin not found #5

Closed milimirstudio closed 6 years ago

milimirstudio commented 7 years ago

Hi , http://127.0.0.1:8000 = Works http://127.0.0.1:8000/admin =Does not work

display error : "Whoops. Navigation not found - please see if url is in database (navigation_admin"

thanks 👍

bpocallaghan commented 7 years ago

Hi @milimirstudio

Thanks for giving the project a look.

Just want to confirm - are you using a virtual host - so you can access the site like: http://project.dev instead of the http://127.0.0.1:8000 - This will allow you to have multiple projects on the same pc.

About the error - usually its one of the below:

Please have a quick look at these closed issues. Get ParenstAndYou is Null php artisan db:seed error

It might not be relevant to you - just trying to eliminate some common issues :)

Please give me a shout if it did not work or have any questions!! Thanks

blissville commented 7 years ago

http://localhost:8000/admin does not work. navigation_admin successfully created in the database. app_url in .env file points to http://localhost

bpocallaghan commented 7 years ago

Hi @blissville

Just want to check - can you see if there are any entries in the navigation_admin table?

In terms of 'does not work' - do you mean it gives the error 'navigation not found' or 'page not found'

Thanks

0xd5dc commented 6 years ago

I got the same issue while usingphp artisan serve and php artisan route:list error message: "Whoops. Navigation not found - please see if url is in database (navigation_admin" so is it possible there is a typo "("

0xd5dc commented 6 years ago

I figured out the cause...getCurrentUrl() in TitanController in the Titan package does not parse the elegantly. localhost:8000/admin was parsed as /8000/admin instead of /admin. nice job on your comments.

0xd5dc commented 6 years ago

my fix for your TitanController protected function getCurrentUrl($prefix = '/')

{
    //$url = substr(request()->url(), strlen(config('app.url')));
    // prefix (request can be http://xx and app.url is https)
    $url = request()->path();
    $url = $prefix . ltrim($url, $prefix);
    return $url;
}

pls, try regex instead of string manipulation

bpocallaghan commented 6 years ago

Hi @summermick

Thank you for being interested in the 'starter project' and for fixing the issue :) I gave it a few tests and seems to be working 100% - thx.

Titan v0.2.7 has the fix in - TitanController

Side note. I am currently busy with a project where I updated this project to Laravel 5.5 and added a few more CRUD (photos, news and events, articles, tenders, etc) and then a simple Page Builder for the website. Hopefully I will get some time - end of this month or early Nov to strip it down and update this repository.

Please shout if you have any questions / suggestions. Thank you very much!