Day 53 – Laravel

Despite:

  • SAAS being completely overpopulated with products
  • Agents being likely to take over most software
  • Automation tools likely to remove the need a lot of tool chaining dev

Despite all this, I still want to build my own platform. Who knows where it will lead to.

I had started to do this already but in the process:

  • Laravel upgraded to 12
  • Laravel Jetstream was superseeded by the new starter packs
  • Laravel Spark wasn’t suitable for Stripe integration since I wanted to use Stripe tax

Before I go much further with the dev I’m going to strip back and start from the react starter pack.

I’m comfortable with either Vue or React; but I’m going react mainly because I am going to integrate some stuff from Flowbite Pro.

How To Install Laravel 12 Starter Kits with Laravel Sail

I know there’s Laravel Herd these days, but i’ve got used to Sail and I like using docker. I don’t see a reason to change. But I needed to find a manual way of installing Laravel Sail straight off because my local composer was all messed up.

Install.sh

#!/bin/bash

# Check if a project name was provided
if [ -z "$1" ]; then
  echo "Usage: $0 <project-name>"
  exit 1
fi

PROJECT_NAME="$1"

docker run -it --rm \
    --user "$(id -u):$(id -g)" \
    -v "$(pwd):/app" \
    -w /app \
    -e COMPOSER_HOME=/tmp/composer \
    laravelsail/php84-composer:latest \
    bash -c "composer global require laravel/installer && /tmp/composer/vendor/bin/laravel new \"${PROJECT_NAME}\""

You can then call this with:

sh install.sh desired_project_name

This scripts will install Laravel from a docker container with composer in it. Then cd into your new directory and run a second script to install sail into it. I like how this step lets you select DB type because previously I had to mess around with docker to get it working.

Install2.sh

docker run -it --rm \
    --user "$(id -u):$(id -g)" \
    -v "$(pwd):/app" \
    -w /app \
    -e COMPOSER_HOME=/tmp/composer \
    laravelsail/php84-composer:latest \
   php artisan sail:install

Big thanks to guy on reddit

You can then use:

  • sail up -d
  • sail artisan migrate
  • sail npm install
  • sail npm run dev

Has Laravel Gone Backwards With These?

They’ve pissed off a lot of people in the community who were relying on JetStream. You can still use it but it looks like Laravel lot are going to force it out over the long term.

There’s:

  • No teams setup whereas JetStream had it
  • JetStream had 2FA
  • JetStream had a better profile settings page

One thing I’ve noticed is that there are no teams integrated into it, so it’s sort of a step backwards from JetStream from that perspective. However, it’s not a huge problem.

Good Opportunity For Data Export Feature

The main premise of the platform is keeping your data intact and organised. Because it’s a SAAS system at its heart, technically the data is on own servers, but we would offer a solution where you can have your own server and have full control over that.

I’ve never liked apps that don’t let you export your data nicely, so I’ve been using this Laravel 11 platform for a few things, and I’ll want to bring the data over… so a new export/import feature is imminent.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *