PHP code example of designcoda / backpack-blockcrud

1. Go to this page and download the library: Download designcoda/backpack-blockcrud library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

designcoda / backpack-blockcrud example snippets


php artisan migrate

php artisan vendor:publish --provider="Backpack\BlockCRUD\BlockCRUDServiceProvider"

php artisan vendor:publish --tag=blockcrud --force
php artisan view:clear

php artisan migrate

php artisan vendor:publish --provider="Backpack\BlockCRUD\BlockCRUDServiceProvider"

php artisan vendor:publish --tag=blockcrud --force
php artisan view:clear

*Editable*  
<div class="some_class{{ isset($edit_mode) ? ' blockcrud-editable' : '' }}"
    @if (isset($edit_mode))
    contenteditable="true" id="unique_id"
    @endif
>
    {!! $unique_id ?? 'Some text in block' !!}
</div>

*Этот блок редактируется*  
<div class="some_class{{ isset($edit_mode) ? ' blockcrud-editable' : '' }}"
    @if (isset($edit_mode))
    contenteditable="true" id="unique_id"
    @endif
>
    {!! $unique_id ?? 'Текст в блоке' !!}
</div>