Skip to content

cviebrock/eloquent-replaceable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eloquent-replaceable

Note: The master branch and releases >=1.0 are for Laravel 5. Use the 0.x branch or ~0.9 releases for Laravel 4.

Installation

Include the package:

composer require "cviebrock/eloquent-replaceable:~0.9"

Add the service provider to app/config.php:

'providers' => [
    'Cviebrock\EloquentReplaceable\ServiceProvider',
],

Publish the configuration:

php artisan config:publish "cviebrock/eloquent-replaceable"

Configuration

Update app/config/packages/cviebrock/eloquent-replaceable/config.php as needed (see the comment in the file for help).

Usage

$model = Model::find(1);

// echo the raw model attribute:
echo $model->some_attribute;

// echo the model attribute with all replacements handled:
echo $model->doReplacements('some_attribute');

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages