Summary#
I had hoped to be a lot furhter along by now, but I ended up getting the flu on Saturday, slept most of the day Sunday and Monday, and I’m just now feeling like getting out of bed and doing stuff again so here’s day 13 three days late.
I made a pivot from sqlite to postgres so I can verify things work when I get ready to publish to cloud.
Work Session#
It was a pretty easy day. I installe postgres on my linux box
1
2
3
4
5
| sudo apt update
sudo apt install postgresql postgresql-contrib php8.4-pgsql -y
sudo systemctl start postgresql
sudo systemctl enable postgresql
|
and created my database
1
2
3
4
5
6
7
| sudo -u postgres psql
CREATE DATABASE rhizome_cms;
CREATE USER [redacted] WITH PASSWORD [redacted];
GRANT ALL PRIVILEGES ON DATABASE rhizome_cms TO [redacted];
ALTER DATABASE rhizome_cms OWNER TO [redacted];
\q
|
Then I updated my .env file and ran php artisan migrate.
The last thing I did was create a booted method in the Site model to automatically create a Home page when a site is created.
1
2
3
4
5
6
7
8
9
10
| protected static function booted()
{
static::created(function ($site) {
$site->pages()->create([
'title' => 'Home',
'slug' => 'home',
'content' => 'Welcome to your new site! This page was automatically generated to help you get started. You can edit this content anytime from your dashboard.',
]);
});
}
|
Recap#
The commit for todays session is commit 4ec019b.