laravel Posts

Easy Markdown with Syntax Highlighting, PHP Edition

Easy Markdown with Syntax Highlighting, PHP Edition

Hi there, and welcome back to this 14th installment of "I rewrote my blog in another framework that I'm interested in learning, this time in Laravel". The trick that we'll be exploring today is that, in contrast to Python (the last version was in Django), PHP's lib story is a bit more sparse for this exact use case. However, I'm completely pleased with the outcome, so let's get busy!

PHP Markdown

Google that term and you'll find this -... from scratch - Laravel, Redis, and the Platform CLI

Hello, and welcome back to from scratch. In this post we'll be reconfiguring your Laravel app that we've been working on in the previous posts to use Redis as a cache and session store, rather than the default file store. We'll also install the Platform CLI and use it to SSH into our application container and get a feel for the layout of the filesystem after it's deployed to its environment.

But first, I'd like to have a brief chat about Git...

Using the tools the way... from Scratch - adding a database to your Laravel app

Hello (!) and welcome back to from scratch. In this post we'll learn about how to set up the Laravel app from the previous post to hook in to various services on Platform, starting with a database connection and moving on to using Redis as a cache and session store. Along the way we'll visit's "environment variables" feature, and we'll set up our first fully functioning deploy hook.

Prerequisites - go through the previous post and get that far...

Let's get... from scratch - setting up a Laravel app

Hi there and welcome back to from scratch. In this post we'll convert a Laravel app for use on Platform and learn a few tricks that will hopefully inform converting any app for use on Platform.

Step 1 is to get going with a new Laravel app, so follow the instructions on installing Laravel and setting up a new project. Initialize a git repo, add a new platform, and add the git remote to your local repo. All of this is documented in the previous post.

Now, at...

Some more ruminating about Laravel

Expository info (skippable)

So, for nigh 6-7 years now I've been a Rails enthusiast. I bought the PragProg AWDWR book when it was covering Rails 2.x and had the beach and hammock on the cover, and then proceeded to take years to figure out everything the book was actually talking about from the bottom of the stack to the top. I find it very enjoyable to be able to get my ideas out (in code), and Rails is still one of the cushiest frameworks around in terms of ease of use. It's almost as...

Laravel mutator not working

I'm sure this is obvious, but I just spent too long trying to figure this one out. The mutator function wasn't even being called.

Make sure that the field you want to mutate is included in your model's $fillable array, else the ORM doesn't care that you want to do things to it.