#Use backpack panels without admin subdirectory?

94 messages · Page 1 of 1 (latest)

sly prism
#

More like have the backpack admin dashboard be the standard login dashboard. I just want the sidebar and the table views to be on the landing page once logged in as a user

sly prism
#

Correct yes, the basic laravel breeze auth forms.

sly prism
#

Seems like that isn’t the best workflow for what im after. Maybe backpack is the wrong package. I’m trying to get a basic sidebar nav with table views on the user dashboard. I still will have an admin section I’ll add later on. Maybe I rename the admin folder to something else temporarily but I’d rather not even redirect. I just want a nice sidebar / table view as the dashboard. Right now the breeze dashboard is just a landing page. It’s possible I’m misunderstanding something. I’m still new at this.

#

I’ll give this a read. Thanks. I originally stayed away from filament bc I’m just sticking with breeze and alpineJS. I’m not trying to use react or vue front end apis

#

Really after the side panel though. Maybe I just copy one in and skip filament. I can’t seem to find one online without it being a full on admin / framework.

#

I searched all day basically and found nothing for free. Even the paid ones are just too complex for what I’m trying to do which is just create as basic of a pilot app as possible bc I’m so new with it. I couldn’t find a free one that’s just a simple sidebar and table view that sits on top of breeze. Every one is just doing too much on top of what I’m after, or is just something that goes into an admin folder or has its own login system… don’t need any of that. Maybe I just make my own.

#

It’s been very challenging as a beginner. I’ve basically been lost swimming in a sea of options which is why I came here.

meager lichen
#

@sly prism if you go to your config config/backpack/base.php you will have a key named: route_prefix. Here is the source: https://github.com/Laravel-Backpack/CRUD/blob/9b67d0ce33b3e18fdc1c69fa79cbe2a385017080/src/config/backpack/base.php#L27
You can just set an empty string there to don't use any prefix.
Usually we don't follow this channel as a support channel, we follow stackoverflow with tag laravel-backpack, and have our own "question forum" here: https://github.com/Laravel-Backpack/community-forum/discussions/
Feel free to do this kind of questions there, as I think it will be easy to find accurate answers there.
PS: I am one of Backpack maintainers.

sly prism
meager lichen
#

@sly prism you can use it with breeze and disable Backpack authetication, or you can install laravel without breeze and use Backpack authentication (that is pretty much the same thing as breeze)
I would advise you to try our 10 minute intro (it's really 10m) and play with it.
You will have a new laravel app (no breeze, no vue, no vite. no react) with Backpack. With Backpack authentication and views.
You can do do your own configs, and ask questions whenever you are stuck 😉 https://backpackforlaravel.com/docs/6.x/getting-started-basics

sly prism
# meager lichen <@245651763909099520> you can use it with breeze and disable Backpack autheticat...

Thanks, that reply on gitbub was extremely helpful! I think I will just go with a fresh backpack install but i'll probably stick with breeze for auth since i already have that working. I think i'm really close to having some success with the project. I am having a Linux issue that maybe you can help with. When I first installed backpack, it didnt work properly, i believe b/c my boss doesn't have composer globally installed. I'd either get http500 or htpp 401 error, depending if i did pass through or not. When trying to debug the code, It seemed like i was missing controllers and other assets. My guess is b/c during the install of backpack, it threw a "composer not installed" message while going through the script. I'll copy my issue in here that i posted elsewhere.

#

here is the post: i think im narrowing in on my issue i described yesterday. The server does not have composer globally installed. Composer.phar is located right above the webroot and I can load composer with the command php composer.phar. That works fine but when I have to run the package via php artisan backpack:install, it throws an error even though it tells me it was a successful install. Digging into the logs I find a message saying that composer is not installed. I think it’s bc the php artisan script has just composer and not a php composer.phar line. Is there a way I can add composer to my bash so the script runs correctly? Or do I need to ask my boss to install composer globally? This is my first time working with Linux so I’m just trying to follow the documentation step by step, but all of the documentation assumes that composer is installed globally. My boss seems hesitant to install this globally and says it’s not needed. Attached is a photo of the backpack install where it appears to install successfully but throws an error towards the top. Thanks

sly prism
#

I already asked he said no docker. What should I do here? I already have the DB built. Maybe I can just copy in all raw files and build out models and routes?

sly prism
#

My boss. He doesn’t want docker installed and he also doesn’t want composer globally installed.

#

Yes, I get administrator password required

#

He is saying I don’t need it. It’s very frustrating. The same thing happened with NVM but then I ran a file to update my bash and then I was able to run nvm

#

I’m not sure if I can do the same thing with composer. I tried a few things but it didn’t work

#

He will just go with Wordpress if he has to do it.

#

Its a VPS on dreamhost. If there is no way around this problem without globally installing composer I may just have to copy files

#

Another option is to run an instance on my local desktop but I’m not really sure if that’s the best idea bc it’s not a company computer. I’m just ssh’n in

#

Ok. Basically when it comes time to deploy all I need to do is copy files to server, correct? Like we don’t actually need composer and nvm on the server to run a laravel project, is that right?

#

Ok cool. So laragon looks promising

#

Yeah that’s no problem

#

No source control yet. It’s like the Wild West with this guy. I’d take another job if I could find one. I’m still looking

#

I’ve just been using phpstorm and storing it locally then having auto delploy to the server while I build it out

#

But since I have to serve it on the web server that’s where I’m hitting composer issues. So maybe I spend time to configure laragon. It seems like a somewhat quick process

#

I don’t even want to push it anymore. I’ve already asked three times. The answer is “it should work and if it doesn’t we can just use Wordpress”

#

I appreciate the help. I’ll report back if I can get laragon working

#

It’s not mvc though correct? I could be missing something. Mvc was a bit of a push on my end since I’m familiar with MVC but only with ColdFusion which was my last job. It’s an enterprise app, but just a small pilot. Queues, auditing, billing, approvals, etc. Laravel is mvc and has great out of the box security is why I picked it

#

Most of all his other clients have been cms or light e-commerce

#

that does seem cool. I gotta stick with laravel for now though. So i think i now have a good option. I can use laragon and deploy locally and get it working. Then just upload via ssh to the VPS server. This seems like a somehwat quick process

sly prism
#

yes

#

php storm does it too

sly prism
meager lichen
#

I use Laragon myself lots of times while developing on windows. what issue are you facing?

sly prism
#

take a peak at #general real quick and scroll up. Basically, basset:check won't run even though my variables seem to be correct

meager lichen
#

what do you use to access your application in the browser ?

#

yeah that's plain wrong

#

you shouldn't be using /public in your urls

#

Laragon automatically create vhosts for you

#

what's the folder name where you have the project ?

sly prism
#

laragon must have failed at that part or something

meager lichen
#

imagine it's , "admin", you must be able to access it through http://admin.test

sly prism
#

localhost in the browser actually just outputs the folder contents

#

so ya that seems wrong

meager lichen
#

you can manually create some vhost in your .hosts file

sly prism
#

maybe i uninstall laragon and try again? Should this have worked by default?

meager lichen
#

but usually when you create a new project inside www folder, you restart apache and mysql and it will ask if you want to create a virtual host for it

#

Maybe you answered "no" when laragon asked for admin permissions

#

but I like told you, it's quite easy to add an alias in your .hosts file

#

in your host file, you should have something like this:

127.0.0.1      demo.test            #laragon magic!
#

you can find the file in C:\Windows\System32\drivers\etc

#

you need to copy it desktop before editing

#

and then put it again in that folder

#

but yeah, laragon should do that automatically for you, you just have to restart Laragon, and it will pop-up and admin system prompt to add this line to that file. In this case the project folder is www/demo

sly prism
#

hosts file seems correct

meager lichen
#

what do you have in hosts ?

#

you have to put the same in APP_URL

#

and use that url to access your application

sly prism
#

ah ok, yeah that could be it, let me give this a go

sly prism
meager lichen
#

do you have your storage linked ? It should be automatic to, but ... 🤷‍♂️

#

do a php artisan storage:link

#

if it still doesn't work, make sure you didn't messed anything up before while trying to figure out what was the error

sly prism
#

seems to exist

#

there is no .test in that url though

#

so not sure if that could be throwing it

meager lichen
#

no test ?

#

can you be more specificc ?

#

what you have in your host file

#

what you wrote on your APP_URL

#

what error does basset throw

#

too many dots

#

come on, simplify your life.
move your project to cahaba or something inside /www, create the cahaba.test in host file, and change the app ur to http://cahaba.test

sly prism
#

ok let me try

#

the folder on production will be named that, i can't change it, but i can change it locally for testing

#

i'll now try to install backpack

#

ok, same issue if i try to install breeze first. I went back, remade the project, and tried just backpack with no breeze

#

that seems to work!

#

created the User model and i now see it displayed. Only issue is its top bar driven navigation. Does it still support leftbar driven navigation?

meager lichen
#

yes

#

you need to configure the theme

#

by default you should got theme-tabler

sly prism
#

yes i selected tabler as the theme

meager lichen
#

you just need to publish theme config, and change layout to vertical

#

by default it comes with horizontal_overlap

sly prism
#

ok, just update setting in config/backpack/ui.php?

meager lichen
#

it's on theme readme 🙏