Category : variables

I want to show the receiver’s email address inside the email. Here is my SendMail.php : <?php namespace AppMail; use AppModelsOrder; use IlluminateBusQueueable; use IlluminateContractsQueueShouldQueue; use IlluminateMailMailable; use IlluminateQueueSerializesModels; class SendMail extends Mailable { use Queueable, SerializesModels; public $order; /** * Create a new message instance. * * @return void */ public function __construct(Order $order) ..

Read more

On selecting an option from mileage, the wear and tear box should be updated,based on the mileage id. Like functioning of tabs. Here is the code for mileage selection: @if(!$subscription[‘mileage’][$spd->id]->isEmpty()) @foreach($subscription[‘mileage’][$spd[‘id’]] as $key=>$mileage) <div class="col-md-4 meter_box_col"> <input type="radio" name="mileage" class="mileage_selection" id="mileage-{{$mileage[‘id’]}}" value="{{$mileage[‘id’]}}" onchange="select_key_value(‘{{$key}}’)" style="display: none;"> <label class="meter_box" for="mileage-{{$mileage[‘id’]}}"> <img src="{{asset(‘assets/front/image/speedometer.svg’)}}" alt=""> <p> <span>Mileage</span> {{$mileage[‘mileage’]}} </p> ..

Read more

In my database name files have columns id_message and file_path. File is stored in MyFiles/{id_message}. Problem is how variables $idParameter and $pathFile save in database. No errors show. function fileUpload(Request $request) { $request->validate([ ‘id_message’ => ‘required|min:6’ ]); $idParameter = $request->id_message=$request->id_message; $result=$request->file(‘file_path’)->store(‘MyFiles/’.$idParameter); return ["result"=>$result]; $pathFile = getPathname(‘MyFiles/’.$idParameter); $file = new File; $file->id_message=$idParameter; $file->file_path=$pathFile; $file->save(); } Source: ..

Read more

I’m trying to pass the name of the countries to a registration form using a select tag. This is RegisterController public function index () { $paises = Pais::pluck(‘nombre’, ‘id’); return view(‘auth.register’, compact(‘paises’)); } Route Route::get(‘register’, ‘[email protected]’); register.blade.php <select name="pais" class="form-control{{ $errors->has(‘pais’) ? ‘ is-invalid’ : ” }}"> @foreach($paises as $key => $value) <option {{ old(‘pais’) ..

Read more

I have a problem when I want to pass data to the view via the middleware to count the number of users. when not using middleware, variable from controller get to the view. my HomeController.php public function index() { $count = User::count(); return view(‘admin.Dashboard’, compact($count); } my Middleware public function handle(Request $request, Closure $next) { ..

Read more

hi i need to generate wifi qr code from variable from database. i use laravel. this works good: {!! QrCode::wiFi([‘ssid’ => ‘wifiname’,’password’ => ‘wifipass’,’encryption’ => ‘WPA’]); !!} I’m trying user setting value: {!! QrCode :: wiFi ($ col); !!} where $col has value [‘ssid’ => ‘wifiname’,’password’ => ‘wifipass’,’encryption’ => ‘WPA’] and tadabase column type is ..

Read more