Skip to content

u/linuxwes

In this archive from May 2011 to Nov 2026

61
posts
170
comments
1
media
2k
score
1 saved before deletion

Is it possible/advisable to use Laravel as the API backend to a BI tool like Superset or Metabase?

We have a Laravel web app with a pretty complicated data security layer in the Laravel code. I am trying to figure out how to give users a BI tool like Superset or Metabase but have the existing Laravel security code sit between the BI tool and the database serving up secured datasets. It seems like the BI tools support API data sources, but I'm not very familiar with them. I'm wondering if anyone has done something like this and how well it worked, pitfalls etc? Thanks.

1 points

Our users would like the ability to create their own reports and charts from our database. I've been looking at tools like Apache Superset, but the problem is we need to pass all data through our Laravel app's security layer as the security model of who should see what is pretty complicated. Are their any open source tools for doing this? Laravel Charts and Datatables both seem like they are for creating reports for your users, not letting them create them.

1 points

> I wish rents were priced fairly relative to comparable mortgages

I'm not sure where you're looking, but they usually are assuming you're looking the full cost of being a landlord: mortgage, down-payment opportunity cost, taxes, insurance, upkeep, and the owners time managing it all. Have you looked at just the mortgage on a 1.2M property?

9 points

Is it possible to call an artisan command from a non-laravel php app? I have a legacy Zend web application which uses it's own autoloader, and I'd like to call an artisan command. I was able to get it working by installing laravel alongside the app and using exec("php artisan <command>") but that spawns a new process and seems kinda hacky. I'd prefer to do an Artisan::call($command) but I have no idea how to get the environment laravel works. Any tips?

1 points

I don't see how it's a big deal when my API will accept a username and password

That's a little like saying "I don't see why I should bother with the seat belt, I'm only driving down the block". It's actually hard to predict what might happen in that short drive, and equally hard to predict who/what/how your code will be used in the future. So you do the little things that will move you from 99.9% sure there won't be a problem to 100% sure. One of Laravel's strengths is it doesn't just make good code possible, it makes it the path of least resistance, and little guardrails like fillable help make it that way.

1 points

Then when you pull the template you run it through a function to substitute the merge fields for real data or empty strings.

Is there some package or other way to do this so I don't have to write the substitution code myself? It's not a complex thing, but also feels like such a common pattern that it should be already implemented somewhere, which is why I jumped on the view blade functionality.

1 points

I've done those exact same streams on a machine with a worse CPU, Ryzen 3 2200G, with Ubuntu, and it's worked fine without noticeably slowing the system down. I forget what browser or other performance settings I was using. You might try Chromium instead of Firefox. It won't be as CPU friendly as Windows though, and possibly substantially so. It's the fault of the browser makers not Linux, that's just how it is when you are 1% of their market share.

3 points

Saying virtual machine in the title is just confusing, you mean remote desktop. You can use Remina as a client to Windows RDP. If you want to game and happen to have an nVidia graphics card on the Windows box you can use Moonlight to connect to nVidia game streaming feature which works really well IME.

7 points

Ah yes that was a great idea! If I launch the python server on the same port as the laravel server I can access it fine, so it's nothing to do with port forwarding or firewalls. The PHP server must have something in place to only be accessible locally, maybe fore security. Thank you!

1 points

Yes I can do the port forwarding for ssh and apache, then connect on both those guest services from the host. It seems like something specific to using the PHP built-in web server. Either that or it's something special about ports 22 and 80 that's letting me forward them and not others. I have been careful to make sure UFW (firewall) is set up correctly, but I wonder if Ubuntu has some other firewalling mechanism at play.

1 points

I have tried swapping the ports used but it didn't help, so I doubt it's anything special about 8000. Since I can port forward SSH and Apache to the host machine just fine it really seems like it's something specific to the PHP built-in webserver. I will check out Wireshark, thanks

1 points

Thanks but no that didn't change anything. Here is my new simplified for testing command with the changes you suggested, and it still picks up the .git dirs (and otherwise correctly includes the PHP files). Pretty sure the issue is that include '*/' pulls in all directories regardless, and perhaps I shouldn't care as it's still skipping the underlying files, but still I'd like it to only sync exactly what I want. Honestly rsync include/exclude syntax seems pretty broken, it shouldn't be this hard to say sync all *.php files in this dir tree.

​

rsync -aPh --include='*/' --include='**/*.php' --exclude='*' --dry-run <source> <dest>

0 points

Still using Emacs so I think I accepted that term long ago. There seems to be a trend in the last decade of always looking for the next great thing and never becoming proficient or happy with anything. I've even encountered some folks for whom it's a career to sound cutting edge in an interview but never produce much in real life because they are so busy looking at cool shiny languages and frameworks. What matters at the end of the day to me is providing value to users and thus the organization. Is it stable, well supported, easy to maintain, easy to hire for, etc are the questions to ask. Using those metrics, pick the best tool for the job. Of course looking at new languages and stacks is very worthwhile, but I think you want to wait until you see them garner a critical mass before adopting them. The trend I do think is reaching some critical mass is moving more code out of PHP and into javascript on the client, reducing PHP to a web service platform.

1 points

I have lots of experience with Linux gaming. It's great, we can play a lot of games, both natively and via Proton, but at the same time it severely limited compared to Windows gaming. Game Pass doesn't work at all on Linux. Epic and Twitch freebies often take work to get running if they will run at all. DRM stops some games from working. There is often a performance hit with Proton, and even sometimes natively.

I do dual boot, but that has it own challenges. For example, when I am working in Linux during the day I can't queue up a large download to play in the evening. So far dual boot is the best solution, but I am always looking for better options.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.