PHP Classes

File: stubs/macro.stub

Recommend this page to a friend!
  Classes of Bhavin Gajjar   Laravel Make Extender   stubs/macro.stub   Download  
File: stubs/macro.stub
Role: Example script
Content type: text/plain
Description: Example script
Class: Laravel Make Extender
Generate files to use in Laravel applications
Author: By
Last change:
Date: 23 days ago
Size: 329 bytes
 

Contents

Class file image Download
<?php

namespace DummyNamespace;

use
Illuminate\Support\Collection;
use
Illuminate\Support\Str;

if (!
Collection::hasMacro('DummyClass')) {
   
Collection::macro('DummyClass', function ($locale = null) {
        return
$this->map(function ($value) use ($locale) {
            
//return Str::upper($value);
       
});
    });
}