jansenfelipe / laraeditable
Edit images and texts in Laravel Views
3.0.0
2015-09-19 16:29 UTC
Requires
- php: >=5.5.9
- laravel/framework: 5.1.*
- wa72/htmlpagedom: ~1.0
Requires (Dev)
- phpunit/phpunit: ~4.0
README
How to use
Add library:
$ composer require jansenfelipe/laraeditable
Add service provider in config/app.php
:
// file START ommited 'providers' => [ // other providers ommited JansenFelipe\Laraeditable\LaraeditableServiceProvider::class, ], // file END ommited
Publish assets:
$ php artisan vendor:publish
Add CSS and JS
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script> <script src="/vendor/jansenfelipe-laraeditable/laraeditable.js"></script> <link href="/vendor/jansenfelipe-laraeditable/laraeditable.css" type="text/css" media="screen" rel="stylesheet">
Find the element you want to edit in your view.blade. Add an identifier, the name of the view and the class laraeditable
:
Ex: index.blade.php
<div id="foo" view="index" class="laraeditable">Some content</div>
Ex: foo.blade.php
<div id="foo" view="foo" class="laraeditable">Some content</div>