process-drive / laravel-js-route
This library is using for call route method inside the javascript file
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:Blade
This package is not auto-updated.
Last update: 2024-11-22 16:10:06 UTC
README
ProcessDrive Laravel Route Using With JS File
This library is used for laravel route method is use for javascript file
Installation
The preferred way to install this extension is through composer.
run
composer require process-drive/laravel-js-route
(or)
composer require process-drive/laravel-js-route:1.0.0
After Installation
To set service provider to config/app.php file
'providers' => [
ProcessDrive\LaravelJsRoute\RouteServiceProvider::class,
]
To set view file in your appliction. you will set below code in common blade file
@include("LaravelJsRoute::JSRoute")
(or)
{{ view('LaravelJsRoute::DefineRoute') }}
Run this command
php artisan route:json
How it use
In javascript file you can use like this
Route :
route(laravel route name here)
route(users.index)
Route with Params:
route(Laravel route name here, Laravel route parameter here like object, Qurey parameter like object)
route(users.edit, {userid: 1}, {name: 'kaviyarasan'})
License
MIT