1. Go to this page and download the library: Download rzl-app/ziggy 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/ */
// config/rzl-ziggy.php
return [
/** Default values for dynamic route parameters.
*
* These values will be applied automatically to any route parameter
* that exists in the route URI but is not explicitly passed during route generation.
*
* Useful for things like localization (e.g. `{locale}`), tenant identifiers (e.g. `{team}`),
* or filtering (e.g. `{type}`) without having to always specify them in the frontend.
*
* You can override these at runtime via `URL::defaults([...])`.
*/
'defaults' => [
/** Default for `{locale}` route parameter. CLI `--locale` overrides this value. */
'locale' => env('APP_LOCALE', 'en'),
// another example:...
// 'type' => 'default', // Default value for routes requiring {type}
// 'team' => 'main', // Default tenant/team identifier (e.g. {team})
],
// other you config...
];
// config/rzl-ziggy.php
return [
"lang" => "ts",
// other you config...
];
// config/rzl-ziggy.php
return [
"output" => [
"name" => "index", // → index.ts or index.js
"path" => [
"main" => "resources/js/rzl-ziggy/routes", // Output folder only
]
],
// other you config...
];
@rzlRoutes(nonce: 'your-nonce-here')
// routes/api.php
use RzlApp\Ziggy\RzlZiggy;
Route::get('rzl-ziggy', fn () => response()->json(new RzlZiggy));