<?php /** * Created by Cristian. * Date: 11/10/16 11:43 PM. */ namespace Reliese\Coders\Model; use Illuminate\Support\Str; class Mutation { /** * @var string */ protected $name; /** * @var string */ protected $body; /** * Mutation constructor. * * @param string $name * @param string $body */ public function __construct($name, $body) { $this->name = $name; $this->body = $body; } /** * @return string */ public function name() { return 'get'.Str::studly($this->name).'Attribute'; } /** * @return string */ public function body() { return 'return '.$this->body.';'; } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Relations | Folder | 0755 |
|
|
Templates | Folder | 0755 |
|
|
Config.php | File | 1.2 KB | 0644 |
|
Factory.php | File | 17.71 KB | 0644 |
|
Model.php | File | 25.74 KB | 0644 |
|
ModelManager.php | File | 1.48 KB | 0644 |
|
Mutation.php | File | 742 B | 0644 |
|
Mutator.php | File | 1.62 KB | 0644 |
|
Relation.php | File | 397 B | 0644 |
|