markjtaps/login

A Laravel 11 package that displays a SweetAlert welcome message on user login.

Maintainers

Package info

github.com/kamotetaps/markjtaps-login

pkg:composer/markjtaps/login

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2025-11-10 08:52 UTC

This package is not auto-updated.

Last update: 2026-03-31 08:56:02 UTC


README

A simple Laravel 11 package that displays a SweetAlert welcome message whenever a user logs in.

Installation

Install the package via Composer (local development):

composer require markjtaps/login:@dev --prefer-source


## Setup

Follow these steps to set up the package in your Laravel 11 application:

1. Register Middleware

Add the middleware to your app/Http/Kernel.php file in the web group:

```bash
protected $middlewareGroups = [
    'web' => [
        // ...
        \Markjtaps\Login\Http\Middleware\LoginAlertMiddleware::class,
    ],
];


This middleware sets a session variable with the user’s name on login.

## 2. Include Blade Directive**

Include the Blade directive in your main layout (e.g., resources/views/layouts/app.blade.php):

```bash
@loginAlert


This directive renders the SweetAlert script whenever a user logs in.