PHP code example of amjadiqbal / laravel-rough-notation
1. Go to this page and download the library: Download amjadiqbal/laravel-rough-notation 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/ */
amjadiqbal / laravel-rough-notation example snippets
return [
'assets' => [
'cdn' => true,
'module_url' => 'https://unpkg.com/rough-notation?module',
'local' => [
'public_url' => '/vendor/rough-notation',
'module' => 'rough-notation.esm.js',
],
],
];
use AmjadIqbal\RoughNotation\Notation;
echo Notation::make('circle')
->color('red')
->strokeWidth(3)
->group('hero')
->render('Important Text');
// routes/web.php
use Illuminate\Support\Facades\Route;
Route::view('/rough-demo', 'rough-demo');
bash
php artisan rough:install
bash
php artisan rough:install --cdn=false --publish-assets=true --assets-path=public/vendor/rough-notation
bash
php artisan vendor:publish --tag=rough-notation-config
bash
php artisan rough:publish-assets --path=public/vendor/rough-notation
blade
<!-- resources/views/rough-demo.blade.php -->
@extends('layouts.app')
@section('content')
<div style="display:grid; gap:16px; padding:24px;">
@annotate('underline') Underline @endannotate
@annotate('box', ['padding' => 8]) Boxed @endannotate
@annotate('circle', ['color' => 'red']) Circled @endannotate
@annotate('highlight', ['color' => '#fff59d']) Highlighted @endannotate
@annotate('strike-through') Struck @endannotate
@annotate('crossed-off') Crossed @endannotate
@annotate('bracket', ['brackets' => ['left','right']]) Bracketed @endannotate
@annotate('underline', [], 'hero') Step 1 @endannotate
@annotate('box', ['padding' => 8], 'hero') Step 2 @endannotate
@annotate('circle', ['color' => 'red'], 'hero') Step 3 @endannotate
</div>
@endsection