• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

How can I pass the list to the component variable in Laravel?

phplaravellistcomponentslaravel-blade


PHP Snippet 1:

<x-widgets.pricingCard name="Free" allowedFeaturesList="{!! json_encode($allowedFeaturesList) !!}}"/>

PHP Snippet 2:

{
   $this->name= $name;
   $this->allowedFeaturesList= json_decode($allowedFeaturesList);
}

Related Snippets

Laravel 5: Is there a non-case sensitive way to sort a collection by an attribute?

Load a .env file with PHP

Pages are working fine on localhost but not running on the hosting server

Laravel relationship belongsToMany with composite primary keys

PHP to search within txt file and echo the whole line

Maatwebsite Excel 3.1 : how do I skip duplicate data when imported?

Stop caching for PHP 5.5.3 in MAMP

Natural ORDER in Laravel Eloquent ORM

Put content of wordpress page inside div

Get sql.h error on MacOS 12 (Monterey) sqsrv and pdo_sqsrv drive installation

Explode not working properly with dash

Show date difference as "20" instead of "20 years ago"

Get data from accuweather api url

Unable to Edit config.inc.php

merging two arrays with specified index

About Contact Privacy policy Terms and conditions