share laravel code example
Example 1: pass parameter to view laravel
Route::get('/', function () {
return view('greeting', ['name' => 'James']);
});
Example 2: laravel share
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha256-4+XzXVhsDmqanXGHaHvgh1gMQKX40OUvDEBTu8JcmNs=" crossorigin="anonymous"></script>
<script src="{{ asset('js/share.js') }}"></script>