Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: rcane on February 16, 2023, 12:35:29 PM

Title: larvel and php pages
Post by: rcane on February 16, 2023, 12:35:29 PM
I've never used laravel, but I'm getting someone assistance on a curl project (to log into a work portal and get some text from a form), and the person wants to use laravel.

Don't have any experience with this, on either end.

Would there be any problem with this if my page is just bare-bones php/html?   the extra pages and such I make are strictly for myself and almost always used on mobile devices.

Title: Re: larvel and php pages
Post by: Arantor on February 16, 2023, 01:18:05 PM
You basically can't just do barebones pages that live inside a Laravel app without setting up some struts out of the Laravel app.

In *theory* you could dump the files into the public folder but in practice Laravel doesn't particularly like that (and doubly so if they're PHP files, it really doesn't want that)

And integrating to SMF just in case that's a consideration is... significantly more work, Laravel doesn't play nicely with SMF SSI at all.


That said, Laravel is designed for building out full applications - using it to get some data from another site and do something with it feels very much like 'here is a walnut I need to crack, here let me use a sledgehammer' - like, I build stuff in Laravel, but there's times I'll use a one page PHP file and times I'll use Laravel, and these two rarely overlap.