Repeats requested variables back as a placeholder for javascript templates in laravel
$ composer require awkwardideas/parrot
Under Package Service Providers Add, (*2)
AwkwardIdeas\Parrot\ParrotServiceProvider::class,
Under Facades/Class Aliases Add, (*3)
'Parrot' => AwkwardIdeas\Parrot\Facades\Parrot::class,
@parrot('view.name', ['some' => "", 'data'=>"", 'parrotClass'=>"CustomClass", 'parrotID'=>"templateID"])
@parrotif('view.name', ['some' => ""])
Similar to @includeif blade directive, (*4)
@parrotClass
If the template is called with parrot, it will show the $parrotClass variable. A default class of parrotTemplate is output if a custom class is not provided., (*5)
@parrotID
If the template is called with parrot, it will show the $parrotID variable., (*6)
@onParrot
Starts an if case for when parrot is being used. If not being parroted, the template wont render the contained content. An @else
may be used with @onParrot
, (*7)
@endOnParrot
Ends the if case for @onParrot
, (*8)
@noParrot
Starts an if case for when the template is being render without parrot. If being parroted, the template wont render the contained content. An @else
may be used with @noParrot
, (*9)
@endNoParrot
Ends the if case for @endNoParrot
, (*10)