Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

lattkkthx's avatar

Guidance in improving the OOP framework from PHP conditioner

Hello, nobody likes long stories so here is what I am trying to do:

I am following the PHP conditioner tutorial as I am pretty new to laracasts.

At work I deal with a lot of landing pages, basically really really small websites made of a maximum of 3-4 pages.

Because of that I am trying to create a framework based on the one presented in the series, basically I copied everything and I stopped when COMPOSER was presented in the series.

I need some guidance on the following:

  1. How can I make the framework work on any subdomain? for example if I install the framework on a subdomain, all my routes break.
  2. Should I add composer or not? Seems a little too much for what I need ( 3-4 pages websites)
  3. I need to create an admin/login and show certain routes only if you are logged, is any tutorial on the website showing how I could learn to do this?
  4. I need to allow the admin to export the registrations from the database, I will use some library I guess.
  5. I need to send people a customized email template after they fill the contact form (with the logo of the website and some friendly message), what is the best way to achieve this?

This is all! Thanks!

0 likes
5 replies
D9705996's avatar

Most of what you ask is in the documentation

How can I make the framework work on any subdomain? for example if I install the framework on a subdomain, all my routes break.

https://laravel.com/docs/5.7/routing#route-group-sub-domain-routing

Should I add composer or not? Seems a little too much for what I need ( 3-4 pages websites)

If you are using laravel you need to use composer

I need to create an admin/login and show certain routes only if you are logged, is any tutorial on the website showing how I could learn to do this?

https://laravel.com/docs/5.7/authentication

I need to allow the admin to export the registrations from the database, I will use some library I guess.

Use https://github.com/spatie/laravel-backup

I need to send people a customized email template after they fill the contact form (with the logo of the website and some friendly message), what is the best way to achieve this?

Use notifables - https://laravel.com/docs/5.7/notifications you can send different content based on you business rules if needed

If you are just wanting to server some static pages then laravel might be overkill may be something like netlify might be better

https://www.netlify.com/

D9705996's avatar

the framework I am talking about

The link you posted is not related to a framework but the PHP language apart from the last lesson which introduces laravel and recommends

So that brings this series to a close! Review the completed source code on GitHub. Your next stop should be Laravel From Scratch! Get to it.

lattkkthx's avatar

Odd, looks like the correct to link to me when I press on it...

D9705996's avatar

Why reinvent the wheel. Just use laravel as it covers all the items you want to build yourself.

Please or to participate in this conversation.