Skip to content

Latest commit

 

History

History
73 lines (60 loc) · 1.31 KB

README.md

File metadata and controls

73 lines (60 loc) · 1.31 KB

Laravel + Filament + Octane + Swoole

Copy .env.example to .env

cp .env.example .env

Change the environment variables

Get start

To install dependencies:

docker run --rm \
    -u "$(id -u):$(id -g)" \
    -v "$(pwd):/var/www/html" \
    -w /var/www/html \
    laravelsail/php82-composer:latest \
    composer install --ignore-platform-reqs

Export sail to bashrc

echo "alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail'" >> ~/.bashrc;
source ~/.bashrc

Up the application

sail up -d

Create app key

sail artisan key:generate

Migrate database

sail artisan migrate

Run the shield seeder

sail artisan db:seed --class=ShieldSeeder

Create the panel-user

sail artisan make:filament-user

Make the super-admin

Get the user id and run the command sail artisan shield:super-admin --user=<user_id>

sail artisan shield:super-admin --user=1

Restart application

sail restart

Install npm dependencies

sail npm install

Build the front end scripts

sail npm run build

Test the websocket server

After logging in, open the browser console and call the /testEvent route. Then, observe in the console that there should be a {ping: true}.