DEV Community

Cover image for Linkeeper - Lesson 01 - Installation
HappyToDev
HappyToDev

Posted on • Updated on • Originally published at happyto.dev

Linkeeper - Lesson 01 - Installation

In this little serie, we will learn the basics about Laravel through a little application LinKeeper.

It goal is to keep your links and share them to the world.

So, what we need ?

We have to bring solutions to these definitions :

  • an user can signin, login, logout and manage his account
  • a user can see a list of their links
  • an user can add, edit or delete a link
  • an user can have a shareable link to share his links with the world
  • a link has a name, a status (published or not) and obviously a link. May be we will add some options later.

The purpose here is to discover the basic concepts of Laravel and FilamentPHP.

In this serie, I will use Laravel 11 and FilamentPHP 3.

Let's go and beginning with the very basic : the install

Installing Laravel

As every Laravel project, we have to launch the laravel install.

If you have the laravel installer it's as easy as type laravel new linkeeper in your favorite terminal.

If you prefer composer, just use this command instead composer create-project laravel/laravel linkeeper

Follow theses steps, which consisting to keep default choices and click enter three times 😉.

Launch install with Laravel Installer

Image description

Image description

Image description

Laravel is installed 🎉

Image description

As we have choose sqlite as database there is no more configuration needed, except APP_NAME, APP_TIMEZONE if you want.

For more simplicity, I let the language setting with default value. Feel free to change it if you need.

Check the install

Personnaly, I work on Mac with Herd. I can check http://linkeeper.test on my browser.

Image description

Everything seems ok !

If you need to work with https, it's perfectly possible with Herd in a single click.

Go to Herd settings, choose 'Sites' tab and search for your current url. Here : linkeeper.test.

Look for the lock and click on it to activate https.

Image description

Image description

Easy, peasy ! No ?

FilamentPHP install

Now, we have to install FilamentPHP. Sincerely, you don't need me for these steps, you just have to look at the incredible documentation of Laravel and Filament.

But, if you are already here, let's keep forwarding together 🤣

So, just copy / paste the 'Get Started' tutorial :

composer require filament/filament:"^3.2" -W

php artisan filament:install --panels
Enter fullscreen mode Exit fullscreen mode

Let the default choice when Filament ask for id :

Image description

And voilà! Filament is installed.

Create a first user

We need an user to start play with Filament.

php artisan make:filament-user
Enter fullscreen mode Exit fullscreen mode

Here too, answer questions for your name, email and password.

Image description

Check the install

Let's go to the link provided to ensure that everything is ok.

Image description

Enter your credentials and if everything is ok, you will see something like that :

Image description

Change the name of application

As you can see in the top left corner the name of the app is "Laravel", let's change this for "LinKeeper".

Open your project in your favorite IDE or if you prefer for this minor change, type nano .envin your terminal.

You just have to change the APP_NAME key :

Image description

If your name has spaces, you have to use the quote for your name.

ctrl + x to exit, say 'yes' when nano asked you if you want to save your file and confirm the name of the file (.env) by pressing return key.

Your .env file is now saved, you can reload your page and you will see the name of the app changed in the top left corner.

Image description

This is the end of this first part. In the next episode, we'll see how to start playing with Filament and models.

Don't hesitate to comment if you have question or if you see a mistake.

Top comments (0)