Open
Description
Environment: Laravel 10 (with AdminLTE).
I've added the Mckenziearts\Notify\LaravelNotifyServiceProvider::class
service provider to config/app.php
, published the config file and assets and executed composer dump-autoload
. Here is my layout:
@extends('adminlte::page')
@section('title', 'Admin')
@section('content_header')
@yield('content_header')
@stop
@section('content')
@include('notify::components.notify')
@yield('main')
<x:notify-messages />
@stop
@section('css')
@notifyCss
<link rel="stylesheet" href="/assets/admin.css">
@stop
@section('js')
@notifyJs
@stop
And here I'm calling notify()
in my controller:
<?php
namespace App\Http\Controllers\Product;
use App\Http\Controllers\Controller;
use App\Http\Requests\Product\StoreRequest;
use App\Models\Product;
class StoreController extends Controller
{
/**
* Handle the incoming request.
*/
public function __invoke(StoreRequest $request)
{
// ...
notify()->success('Laravel Notify is awesome!');
// ...
}
}
This is what I get:
https://flareapp.io/share/DPyrJl47#F67
Thanks in advance!
Metadata
Metadata
Assignees
Labels
No labels