PHP code example of nop-app / filament
1. Go to this page and download the library: Download nop-app/filament library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nop-app / filament example snippets
// app/Http/Middleware/NopUser.php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Config;
class NopUser
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if (Auth::check()) {
Config::set('nop.user', $userName);
}
return $next($request);
}
}
bash
php artisan vendor:publish --tag=nop-config