sbx / frontcrm
This package allow you to edit your static pages from frontend.
Installs: 59
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:Blade
This package is auto-updated.
Last update: 2025-05-06 03:33:19 UTC
README
This package allow you to edit your static text and images from frontend.
Installation
To install the package
composer require sbx/frontcrm
Add Sbx\Frontcrm\Providers\CRMServiceProvider::class
in your project app/config.php
under providers array.
Run
php artisan migrate:refresh --path=vendor/sbx/frontcrm/src/database/migrations/2023_09_28_174935_create_sbx_settings_table.php
Configuration
Add @include('frontcrm::editor', ['editable'=> true])
in your view page before </body>
tag see example below.
<html> <head> ... </head> <body> ... My content ... My scripts ... @if(Auth::check()) @include('frontcrm::editor', ['editable'=> true]) @else @include('frontcrm::editor', ['editable'=> false]) @endif </body> </html>
you can define who will edit and who can only see the changes by define editable
key true
or false
.
and Add sbx-inline-editor
class in your editable text elements.
Add sbx-inline-img-editor
class in your editable img
tags.
See example below:
<html> <head> ... </head> <body> <div class="section1"> <h1 class="sbx-inline-editor">This is the H1 Editable Tag.</h1> <img src="your image link" class="sbx-inline-img-editor" /> <div> <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script> @if(Auth::check()) @include('frontcrm::editor', ['editable'=> true]) @else @include('frontcrm::editor', ['editable'=> false]) @endif </body> </html>
Note:
JQuery is required.