Skip to content

Instantly share code, notes, and snippets.

View Ghostscypher's full-sized avatar

Brian Ngetich Ghostscypher

View GitHub Profile
@Ghostscypher
Ghostscypher / register.blade.php
Created February 2, 2022 12:10
Oauth2-Server app register blade file
@extends('layout.layout')
@section('content')
<form action="{{route('register.post')}}" method="POST">
@csrf
@error('success')
<div class="success">
{{$message}}
</div>
@Ghostscypher
Ghostscypher / login.blade.php
Created February 2, 2022 12:08
Oauth2-Server App login blade
@extends('layout.layout')
@section('content')
<form action="{{route('login.post')}}" method="POST">
@csrf
@error('success')
<div class="success">
{{$message}}
</div>
<br><br>
<?php
namespace App\Http\Middleware;
use App\Traits\LockEventTrait;
use Closure;
use Illuminate\Http\Request;
class LockRouteMiddleware
{
use LockEventTrait;
/**
<?php
namespace App\Traits;
use Illuminate\Cache\FileStore;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Facades\Cache;
trait LockEventTrait
{
protected FileStore $file_cache;
server {
listen 80;
server_name ws.example.com;
# For ssl support add correct path here
#ssl_certificate /path/to/www.example.com.cert;
#ssl_certificate_key /path/to/www.example.com.key;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
<?php
use BeyondCode\LaravelWebSockets\Dashboard\Http\Middleware\Authorize;
return [
/*
* Set a custom dashboard configuration
*/
'dashboard' => [
<script>
const public_channel = '{{config('app.name')}}.Public';
Echo.channel(public_channel)
.listen('OrderShipmentStatusUpdated', (data) => {
console.log(data)
});
</script>
@logged_in
<?php
use Illuminate\Support\Facades\Broadcast;
/*
|--------------------------------------------------------------------------
| Broadcast Channels
|--------------------------------------------------------------------------
|
| Here you may register all of the event broadcasting channels that your
<VirtualHost _default_:443>
ServerName example.com
ServerAlias app1.example.com app2.example.com
ServerAdmin [email protected]
DocumentRoot /var/www/public_html/example.com/public
<Directory /var/www/public_html/example.com>
AllowOverride All
</Directory>
server {
listen 80;
server_name example.com app1.example.com app2.example.com;
# App root path here
root /srv/example.com/public;
# For ssl support add correct path here
#ssl_certificate /path/to/www.example.com.cert;
#ssl_certificate_key /path/to/www.example.com.key;