Commit 8b6de324 authored by Kevin Yumang's avatar Kevin Yumang

SERV-2286 - loremipsum element modifications

parent 44fa9c11
...@@ -108,10 +108,7 @@ ...@@ -108,10 +108,7 @@
public function loremIpsum($parameters) public function loremIpsum($parameters)
{ {
return View('Limitless::Element.LoremIpsum.LoremIpsum') return View('Limitless::Element.LoremIpsum.LoremIpsum')
->withLength( isset($parameters['length']) ->withLength($parameters == [] ? 20 : $parameters);
? (ctype_digit((string)$parameters['length']) ? $parameters['length'] : 0)
: 0 );
} }
/* /*
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
@Limitless::TableAutofillBody([ @Limitless::TableAutofillBody([
[ [
['value' => 'length'], ['value' => 'length'],
['value' => '<i>Integer|Numeric String</i> [Default = <code>0</code>]', 'secure' => false], ['value' => '<i>Integer|Numeric String</i> [Default = <code>20</code>]', 'secure' => false],
['value' => 'The length of random words to generate.'] ['value' => 'The length of random words to generate.']
] ]
]) ])
...@@ -40,13 +40,15 @@ ...@@ -40,13 +40,15 @@
{{-- Sample Output --}} {{-- Sample Output --}}
@Limitless::ElementCardStart(['title' => "Sample Output", 'icon' => 'icon-display4' ] ) @Limitless::ElementCardStart(['title' => "Sample Output", 'icon' => 'icon-display4' ] )
@Limitless::LoremIpsum(['length' => 10]) @Limitless::LoremIpsum(100)
@Limitless::Divider @Limitless::Divider
@Limitless::LoremIpsum(['length' => '20']) @Limitless::LoremIpsum('50')
@Limitless::Divider
@Limitless::LoremIpsum
@Limitless::ElementCardStop @Limitless::ElementCardStop
@php @php
$example = base64_decode("QExpbWl0bGVzczo6TG9yZW1JcHN1bShbJ2xlbmd0aCcgPT4gMTBdKQpATGltaXRsZXNzOjpEaXZpZGVyCkBMaW1pdGxlc3M6OkxvcmVtSXBzdW0oWydsZW5ndGgnID0+ICcyMCddKQ=="); $example = base64_decode("QExpbWl0bGVzczo6TG9yZW1JcHN1bSgxMDApCkBMaW1pdGxlc3M6OkRpdmlkZXIKQExpbWl0bGVzczo6TG9yZW1JcHN1bSgnNTAnKQpATGltaXRsZXNzOjpEaXZpZGVyCkBMaW1pdGxlc3M6OkxvcmVtSXBzdW0=");
@endphp @endphp
{{-- Sample Code --}} {{-- Sample Code --}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment