Sep 6-13 Oct - Deploy Railway - CSRF Laravel BEWARE - AI DOESN'T dominate you - Flask FREE +
Content Index
Welcome to another week. I'm going to talk about all the content uploaded between October 6 and 13, which is the current date.
Community Versions and Training
Starting as always with the community versions: we already have 10 to date, plus the Flash versions, which has over 70 pages. With these, you can start creating your projects in this technology, learn its basis or fundamentals, and develop a small CRUD that includes handling controllers and databases.
These are the initial three or four chapters, completely free.
- https://academy.desarrollolibre.net/libro/laravel
- https://academy.desarrollolibre.net/libro/primeros-pasos-laravel-livewire
- https://academy.desarrollolibre.net/libro/primeros-pasos-con-codeigniter-4/
- https://academy.desarrollolibre.net/libro/primeros-pasos-con-django-5
- https://academy.desarrollolibre.net/libro/primeros-pasos-con-fastapi/
- https://academy.desarrollolibre.net/libro/primeros-pasos-con-flask-3/
- https://academy.desarrollolibre.net/libro/primeros-pasos-con-bootstrap
- https://academy.desarrollolibre.net/libro/primeros-pasos-con-electronjs
- https://academy.desarrollolibre.net/libro/componentes-y-animaciones-personalizadas-en-flutter/
- https://academy.desarrollolibre.net/libro/flutter-flame-desarrollo-de-juegos/
Progress in the Django Online Store
It's also worth remembering that the Django online store application is now completely functional.
This week I've mostly worked on the Laravel one, replicating some changes I made in this course and book.
I also released the introductory video for the Django online store course, where I explain exactly what we are going to build.
Content on YouTube and the blog
Moving on to YouTube and blog content, this week I published about the CSRF token in Laravel. Depending on how you configure it, it may only work in development.
For example, if you make an HTTP request using JavaScript and you're not authenticated in production, it might fail.
It happened to me during registration: it worked perfectly locally, but in production, when moving the application to the domain, the request was blocked if the user was not authenticated.
You have the video and the full publication for more details.

The CSRF Token in Laravel may ONLY work IF the user is Authenticated - https://youtu.be/YVjFb_pNbms
Trends: Python vs JavaScript
Regarding Python, it's rising—to no one's surprise—while JavaScript is falling.
This is due, in part, to the rise of AI coding. However, nothing is perfect: Python is slower than other solutions.
Each language has its advantages and disadvantages, and I mention this briefly in the article.

AI revolutionizes the world of programming: Python rises and JavaScript suffers a historic fall - https://youtu.be/-2vwRvROTvc
Refactoring the payment controller in Laravel
I also published a video from the Laravel LWER course, where we refactored a payment controller.
Remember that there are two stores: one for books and one for generic products.
Both have a payment gateway, listings, and similar behaviors, so we modularized the code as much as possible.

Demo, Convert duplicate code from a controller to clean code in Laravel - https://youtu.be/OB2yX45cp9I
We created a central controller that receives a generic item (be it a book or product), avoiding code duplication.
Opinion: AI as a tool
Another opinion video: AI should be a tool, not the one who directs the project.
You are the pilot, the AI simply assists. I share a personal anecdote about it in the video and the post.

I don't care how the code got to your IDE but I want you to care - https://youtu.be/tIxwHlAu_b8
Payment gateway in Django
I also published a summary of the payment gateway in Django, for the course mentioned earlier.
I explain the layers created:
- The abstract model.
- Specific models.
- Classes that process payments with Stripe and PayPal.
- A class that decides which gateway to charge with.
- And finally the detail view with the product (book or generic).
- Additionally, we configured smart routes and helper methods.
Django: Payment Gateway Summary with Stripe and PayPal + Coupons - https://youtu.be/UYBoMe2Ei10
Demo mode for applications
I also showed how to create a demo of your application, in both Laravel and Django.
In this version, I block certain options and display information when the system is in demo mode.
This is achieved by creating an environment variable and using it in middleware or conditionals.

Create a DEMO Mode for your Application in Django - EASY - https://youtu.be/ipWeTT7k8Xs
Laravel Livewire Store Course/Book
To conclude, the introductory video for the tenth community book.
This week I paused the Django course to focus on Laravel LWER, applying the modularization changes I already implemented in the Django book.
We created abstract product classes, refactored the payment gateway, and improved the structure to make everything cleaner, more scalable, and less error-prone.
We also added demo mode, custom titles, and visual details like flags in the titles.
Laravel Livewire - Online Store
Various Changes
- Payment Gateway Helper
- We implemented a reusable helper to make payments from the view with a single line of code.
- Payment Gateway Helper: Book
- We finished the implementation of the payment helper for books.
- Modular Detail Class
- We implemented an abstract class so that we can implement logic for buyable-type view details.
- Abstract Product Class
- We are going to create an abstract class for products.
- Optional, pass product in the payment gateway
- We show how to pass the complete product from the payment helper template.
- Payment Gateway Summary
- We review the payment gateway, showing the most important classes.
- Restructuring the BasePayment class: Unify payment method
- We are going to do a refactoring in the payment method for books and products.
- Restructuring the BasePayment class: Divide into an abstract class
- We are going to create an abstract class for the Base payment class
- Restructuring the BasePayment class: Divide into an abstract class
- We are going to create an abstract class for the Base payment class
- Demo Mode
- We are going to show how to create a deploy mode for the app in Laravel.
- Custom Title
- We will create a structure to customize the title tag of pages that use the store template.
- Railway, deploy your applications in PHP, Python web, Node... like in Heroku for FREE
- Let's learn a structure for FREE DEPLOYMENT of your applications in Laravel, CodeIgniter, Flask,
- FastAPI, Django, Node, Go, and many more.
Deploy on Railway- We show the steps to deploy a Laravel project on Railway in demo mode.
I agree to receive announcements of interest about this Blog.
Community Books and Courses - Flask and Django/Livewire Shopping Course YouTube and Blog - Laravel Repetitive Code - AI DOESN'T Dominate You! - Django Shopping Introduction - Laravel CSRF BEWARE Livewire Course - Deploy Railway - Modular Controller Payment Detail