Working in Public

Categories: books

I really enjoy reading this book. It gave me more information about the open source history, its philosophy, and its current progress.

I think it is helpful for anyone who uses any open source project, attempt to work on an open source project, or just discuss or contribute in a open source project to read this book. It helps to have empathy towards the people behind the open source projects and the open source community.

Jetstream was released alongside with Laravel 8. It has all the modern authentication method built-in. For example, profile image, password management, two factor authentication, browser session management, and account management.

You can choose using Livewire or Inertia and the designed is preset using Tailwind. The register, login, and profile pages are ready to use out of the box, unless you need to modify these pages, you don’t really know Livewire or Inertia in order to have a fully functional user management system with Jetstream.

Let’s say you cannot afford to have Livewire or Inertia added to your application, you can use Fortify.

  1. Install Fortify composer require laravel/fortify
  2. Publish Fortify resources php artisan vendor:publish --provider="Laravel\\Fortify\\FortifyServiceProvider"
  3. Add app/Providers/FortifyServiceProvider in config/app.php
  4. Manage which services to use in config/fortify.php. As of this writing, Fortify documentation recommends only enable Features::registion(), Features::resetPasswords(), and Features::emailVerification().

Configuring views

We need to tell Fortify to view the login file. In the boot method of FortifyServiceProvider.

Let’s take a look at the login as an example.

Fortify::loginView(function () {
    // resources/views/auth/login.blade.php
    return view('auth.login');
});

The required fields are email and password. It should make a post to /login route.

Let’s do one more with register

Fortify::loginView(function () {
    // resources/views/auth/register.blade.php
    return view('auth.register');
});

The required fields are name, email, and password.

I think Laravel is moving on from Laravel/Ui. The authentication portion of UI is moved to Laravel/Jetstream. Laravel now really don’t have a frontend framework preset, it’s really up to the developer to choose which one to use.

The Social Dilemma

Categories: watch, technology

I enjoy this documentary. Social Media is not bad, but it has a problem. It enables us to create a comfort zone and it enables us to create a bubble for ourselves by telling ourselves that we are always right.

In the documentary, it pointed out that groups are divided more than ever. One side does not hear from the other side anymore because the platform we use and our desire to prove ourselves “right”.

Social medias know this, but they also know this will generate more revenue for their investors. They have no incentive to change the course and I do not think they have a reason to change based on their busienss model.

I am not claiming I am better or “woke”, but by knowing why social media send me notification and recommendation, it helps me to be aware next time when I decide to scroll, click, or receive these notifications.

Upgrade Laravel Installer

Categories: programming, laravel

Laravel 8 is to be released on September 8, 2020. Along with the framework upgrade is the change in Laravel Installer.

Up until Laravel Installer version 3.2.0, when you do laravel new <project-name>, the installer downloads the build from a build server. The build server will be shutdown couple months after Laravel 8 released.

Therefore, it’s important to run the composer update on the Laravel Installer.

Steps

  1. Edit $HOME/.composer/composer.json
  2. Update laravel/installer to ^4.0
  3. Run composer global update laravel/installer
  4. Verify by execute laravel --version
Next | Previous