Created
November 22, 2018 15:48
-
-
Save MohamedLamineAllal/596df7098e9e99d4a364c059b9c082b7 to your computer and use it in GitHub Desktop.
Laravel Serve javascript files through a route
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::group(['prefix' => 'js'], function () { | |
Route::get('filterizr', function () { | |
return response()->file(base_path('node_modules/filterizr/dist/jquery.filterizr.min.js'), [ | |
'Content-Type' => 'application/javascript' | |
]); | |
})->name('js.filterizr'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment