PHP code example of jefhar / laravel-export-constants
1. Go to this page and download the library: Download jefhar/laravel-export-constants 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/ */
jefhar / laravel-export-constants example snippets
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class NunyaController extends Controller
{
#[LaravelExportConstants\Attributes\ExportToJs]
public const URL_INDEX = 'nunya.index';
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
//
}
}
bash
php artisan vendor:publish --tag=export-constants-config