jansenfelipe / laraeditable by jansenfelipe

Edit images and texts in Laravel Views
63
4
3
Package Data
Maintainer Username: jansenfelipe
Maintainer Contact: jansen.felipe@gmail.com (Jansen Felipe)
Package Create Date: 2015-01-02
Package Last Update: 2015-09-29
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-11-15 15:08:31
Package Statistics
Total Downloads: 63
Monthly Downloads: 1
Daily Downloads: 0
Total Stars: 4
Total Watchers: 3
Total Forks: 1
Total Open Issues: 0

Laraeditable

Demonstration

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>