package.json
:
{
"scripts": {
"dev": "vite",
"dev:server": "node public/build/server/server.js",
"build": "vite build",
"build:server": "vite build --outDir ./public/build/server --ssr ./resources/scripts/inertia/server.ts"
}
}
const plugin = require("tailwindcss/plugin"); | |
module.exports = { | |
mode: "jit", | |
purge: { | |
content: ["./src/**/*.{js,ts,jsx,tsx,mdx,vue}"], | |
}, | |
theme: { extend: {} }, | |
variants: {}, | |
plugins: [ |
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\File; | |
use Illuminate\Support\Str; | |
/** | |
* Generates a JSON file with all translations. |
package.json
:
{
"scripts": {
"dev": "vite",
"dev:server": "node public/build/server/server.js",
"build": "vite build",
"build:server": "vite build --outDir ./public/build/server --ssr ./resources/scripts/inertia/server.ts"
}
}
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\File; | |
use Illuminate\Support\Str; | |
/** | |
* Generates a JSON file with all translations. |
<script setup lang="ts"> | |
import { useBackForward } from '@/scripts/use-back-forward' | |
const { reloadOnBackForward } = useBackForward() | |
// When the page component is loaded, if it's a visit made with the "back" or "forward" | |
// browser functionality, the page will reload. You can optionally pass options to Inertia. | |
reloadOnBackForward({ | |
only: ['quotations'], | |
}) |
export default defineConfig({ | |
plugins: [ | |
laravel(['resources/js/app.js']), | |
{ | |
name: 'ziggy', | |
enforce: 'post', | |
handleHotUpdate({ server, file }) { | |
if (file.includes('/routes/') && file.endsWith('.php')) { | |
exec('php artisan ziggy:generate', (error, stdout) => error === null && console.log(` > Ziggy routes generated!`)) | |
} |
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\File; | |
use Tightenco\Ziggy\Ziggy; | |
class GenerateRoutesCommand extends Command | |
{ |
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Console\Concerns\CallsCommands; | |
use Illuminate\Support\Facades\Http; | |
use Laravel\Forge\Forge; | |
use Laravel\Forge\Resources\Daemon; |
<?php | |
use Illuminate\Routing\Route; | |
use Illuminate\Routing\Router; | |
test('basic feature test', function () { | |
$routes = collect(app(Router::class)->getRoutes()->getRoutes()) | |
->filter(fn (Route $route) => ! isVendorRoute($route)); | |
foreach ($routes as $route) { |