PHP code example of unicodeveloper / laravel-mentions

1. Go to this page and download the library: Download unicodeveloper/laravel-mentions 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/ */

    

unicodeveloper / laravel-mentions example snippets


'providers' => [
    Unicodeveloper\Mention\MentionServiceProvider::class,
    Collective\Html\HtmlServiceProvider::class,
];

return [

    'users'    => 'App\User',      // responds to /api/mentions/users
    'friends'  => 'App\Friend',    // responds to /api/mentions/friends
    'clients'  => 'App\Client',    // responds to /api/mentions/clients
    'supports' => 'App\Supporter', // responds to /api/mentions/supports

];

{!! mention()->asText('recipient', old('recipient'), 'users', 'name') !!}

{!! mention()->asText('recipient', old('recipient'), 'users', 'name', 'user-form') !!}
bash
php artisan vendor:publish