Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fdjrr/tas-example-test
TAS Example Test
https://github.com/fdjrr/tas-example-test
laravel livewire
Last synced: 16 days ago
JSON representation
TAS Example Test
- Host: GitHub
- URL: https://github.com/fdjrr/tas-example-test
- Owner: fdjrr
- Created: 2024-10-14T05:35:39.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-16T04:03:09.000Z (2 months ago)
- Last Synced: 2024-10-18T22:08:56.061Z (2 months ago)
- Topics: laravel, livewire
- Language: PHP
- Homepage: https://github.com/fdjrr/tas-example-test
- Size: 400 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TAS Example Test
## Installation
```bash
$ git clone https://github.com/fdjrr/tas-example-test
$ cd tas-example-test
$ composer install
$ npm install
$ cp .env.example .env
$ php artisan key:generate
$ php artisan serve
$ npm run dev
```## Nginx Config
### 1. If you want http://localhost/tas-example-test, follow this config
```bash
server {
listen 80 default_server;
listen [::]:80 default_server;root "D:/Development/Sites";
index index.php index.html index.htm index.nginx-debian.html;
server_name localhost;
location / {
try_files $uri $uri/ /index.php?$query_string;
}location /tas-example-test {
alias "D:/Development/Sites/tas-example-test/public";
try_files $uri $uri/ @tas_test;location ~ \.php$ {
fastcgi_pass php_upstream;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}
}location @tas_test {
rewrite /tas-example-test/(.*)$ /tas-example-test/index.php?/$1 last;
}error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass php_upstream;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}
}
```> Note : please run `php artisan livewire:publish --assets` before run app & uncomment `Livewire::setScriptRoute` and `Livewire::setUpdateRoute` in `web.php` if you using point 1.
### 2. If you want http://tas-example-test.domain.com, follow this config
```bash
server {
listen 80;
listen [::]:80;
server_name tas-example-test.domain.com;
root /var/www/tas-example-test/public;add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_hide_header X-Powered-By;
}location ~ /\.(?!well-known).* {
deny all;
}
}
```