本文整理汇总了PHP中Illuminate\Support\Fluent::address方法的典型用法代码示例。如果您正苦于以下问题:PHP Fluent::address方法的具体用法?PHP Fluent::address怎么用?PHP Fluent::address使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Support\Fluent
的用法示例。
在下文中一共展示了Fluent::address方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Collection
$person = ['name' => ['first' => 'Jill', 'last' => 'Schmoe']];
echo 'name.first is ' . array_get($person, 'name.first') . "\n";
$messageBag->add('notice', 'Array dot notation displayed.');
echo '<hr>';
// Collection
$people = new Collection(['Declan', 'Abner', 'Mitzi']);
$people->each(function ($person) {
echo "Collection person: {$person}\n";
});
$messageBag->add('notice', 'Collection displayed.');
echo '<hr>';
// More at http://daylerees.com/codebright/eloquent-collections
// Fluent
$personRecord = array('first_name' => 'Mohammad', 'last_name' => 'Gufran');
$record = new Fluent($personRecord);
$record->address('hometown, street, house');
echo $record->first_name . "\n";
echo $record->address . "\n";
$messageBag->add('notice', 'Fluent displayed.');
echo '<hr>';
// Pluralizer
$item = 'goose';
echo "One {$item}, two " . Pluralizer::plural($item) . "\n";
$item = 'moose';
echo "One {$item}, two " . Pluralizer::plural($item) . "\n";
echo '<hr>';
// Str
if (Str::contains('This is my fourteenth visit', 'first')) {
echo 'Howdy!';
} else {
echo 'Nice to see you again.';