PHP code example of codeat3 / laravel-nova-likeable

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

    

codeat3 / laravel-nova-likeable example snippets

 php
    class Post extends Resource {
        ...
        public function fields(Request $request)
        {
            return [
                ...
                MorphMany::make('Likes', 'likes', \Codeat3\LaravelNovaLikeable\Resources\Like::class),
            ];
        }
    }