Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Slim 4 Authentication (Micro Laravelification)
Rating: 4.2 out of 5(13 ratings)
93 students

Slim 4 Authentication (Micro Laravelification)

Slim 4's micro framework is about to be Laravel-ified (Eloquent, Email, CSRF, Controllers, Service Providers, DB)
Created byZachary Horton
Last updated 6/2020
English

What you'll learn

  • How to setup Slim 4 & slowly make it a fully fledged Php framework similar to Laravel
  • Slim 4, with Laravel Blade Templates
  • Define Global Functions Via Composer Autoloading
  • Slim 4 Controllers
  • Slim 4 Service Providers Similar To Laravels
  • Slim 4 Http Kernel & Console Kernel
  • Whoops Page, within Slim 4
  • .env file and variables within Slim 4
  • Integrate With Laravel's Eloquent ORM into Slim 4 to allow for simplified Database Interactions
  • Integrate Cake Php's Phinx Package Into Slim 4 allowing us to create migrations & seeders
  • Create Factories With Faker -- From Scratch
  • Creating a Slim 4 Console Kernel
  • Integrating Symfony Console Commands -- Allowing Easy Creation of Custom Console Commands
  • How to integrate Vue JS
  • How to integrate Tailwind CSS
  • Register, Logout & Login Authorization Logic
  • Redirect Middleware (Based on whether the user is Authorized Or A Guest)
  • Code Refactoring & Clean Up
  • CSRF Verification
  • Request Validation Setup (Using Laravel's Illuminate Validation Component)
  • Symfony Sessions
  • Using Symfony Sessions To Properly "Flash" Error Messages To Front End
  • Setting Up Validation Rules To Check Validity Against Persisted Database Data
  • "Old" Form Input Repopulation On Form Validation Failure
  • Refactoring controllers & creating a Simple Form Request Class
  • Sending Emails In Slim 4 (Custom Mailable Class Using Swift)
  • Configure Mailtrap io to catch locally sent eMails
  • Flashing success on submission success

Course content

7 sections27 lectures10h 36m total length
  • Lesson 1: Setup Slim 47:49

    Set up slim 4 for authorization using composer, psr interfaces, and the app factory. Build a bootstrap with a service container, settings, and error middleware, then run and test locally.

  • Lesson 2: Views With Blade6:16
  • Lesson 3: PSR-4 Autoload (Global Helper Functions)3:47

    Define a user model under app\models with PSR-4 autoload, then create a global helper and auto-load it with composer, ensuring the view function works after autoload dump.

  • Lesson 4: Slim 4 Controllers (Dependency Injectable)10:18

    Explore setting up Slim 4 controllers with dependency injection using the PHP-DI Slim Bridge, configure composer packages, and create routes that inject parameters into controller methods.

Requirements

  • Intermediate to Advanced Php
  • Composer
  • MySql
  • Not required, but having Slim 4 experience helps
  • Not required, but having service container and dependency injection experience helps
  • Ability to set up mySql locally and find the port, username, database name, database password, and all other related information needed to connect Php to mySQL

Description

Slim 4 is a micro framework. Unbiased, incredibly abiding to PSR (Php Standard Recommendations), and ultimately able to easily integrate many, many components and packages -- including those from other major frameworks and component libraries.


During this series, using Laravel's architecture as inspiration, we will slowly take Slim's unbiased code and build it out to a more full featured framework.


What features are we adding into slim?

- Service Providers
- Http Kernel
- Console Kernel
- Config Directory
- .env (Environment Variables & Files)
- Global, auto loaded, helper functions
- CSRF Protection
- Tailwind CSS
- Vue JS
- Laravel Collections
- Laravel Validators
- Laravel Str Helper
- Laravel Blade Templates
- Cake Php's Phinx
   -> Phinx migrations
   -> Phinx seeds
- Custom Factories (Using Faker)
- etc...



Through the Laravelification of Slim 4, we will also set up authorization and eventually the ability for a user to reset their account password via email. We'll locally be able to send emails, flash failed form error messages to the front end, pass success form messages to the front end, setup the ability to re-populate "old" form data AKA failed form data so our users don't have to re-type everything in if the validation for the form fails.


What all will we be integrating? Check out the entire list

Packages & Resources Glossary

  • Slim 4

  • Slim Csrf

  • Laravel Validators

  • Laravel Homestead

  • Jenssegers Blade

  • Zeuxisoo Slim Whoops

  • Php Dot Env

  • CakePhp Seeders & Migrations

  • Fzaninotto Faker For Factories

  • Illuminate Database

  • Illuminate Support

  • Php Dependency Injection Container

  • Php Dependency Injection Container Slim Bridge

  • Laravel Mix Webpack Wrapper

  • Swift Mailer for Emails

  • Mailtrap for local email testing

  • Illuminate Mail For Markdown Parser

  • Symfony Console Component For Console Commands

  • Symfony Session Component For Sessions

  • Eloquent For Database ORM

  • Vuejs For Front-end Reactivity

  • Tailwind For CSS & SCSS

  • Vue Material Design Icons

  • Guzzle Http Wrapper

Who this course is for:

  • Intermediate to Advanced Php developers
  • Developers with an interest in Slim 4
  • Php Developers
  • Slim Developers
  • Cake Developers
  • Laravel Developers
  • Symfony Developers
  • Those interested in learning via deep dive
  • Developers interested in the differences between a micro Php framework and full fledged Php framework
  • Developers curious of Slim 4 beyond minimalism and aren't afraid to do a few things wrong to gain a deeper understanding