skip to Main Content

print variable value inside string quote – Laravel

I want to print variable value inside string quote this is my variable var id = $(this).val(); how can i print this variable to this string $('#button_cetak').html('<a href="{{route('report.pdf',[$user->nip,'//this is place i wanna print'])}}" class="btn btn-warning btn-block"><i class="fas fa-print"></i> Cetak</a>'); thanks

VIEW QUESTION

I want to send password reset request to laravel API from vue.js component – PHP Versions

I am making laravel API to reset password by diverting laravel standard password reset function. This is controller <?php namespace AppHttpControllersApiAuth; use AppHttpControllersController; use IlluminateFoundationAuthResetsPasswords; use IlluminateHttpRequest; use IlluminateSupportFacadesPassword; use IlluminateSupportFacadesLog; class ResetPasswordController extends Controller { use ResetsPasswords; public function…

VIEW QUESTION

Route model binding select specific columns with relation – Laravel

Route: Route::get('/posts/{post}', [PostController::class, 'show']); Controller: public function show(Post $post){ $postData = $post->load(['author' => function($query){ $query->select('post_id', 'name'); }]) ->get(['title', 'desc', 'created_date']) ->toArray(); } This returns all the posts in the database, While I only want to get the selected post passed…

VIEW QUESTION
Back To Top
Search