PHP code example of vanguardkras / laravel-simple-articles

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

    

vanguardkras / laravel-simple-articles example snippets


php artisan storage:link

php artisan migrate

php artisan vendor:publish --tag=articles_views

php artisan vendor:publish --tag=articles_config

php artisan vendor:publish --tag=articles_translations

    /**
     * Method checks user's right to manage articles.
     *
     * @param User|null $user
     * @return bool
     */
    public static function checkUser(?User $user)
    {
        return $user ? $user->id === 1 : false;
    }

php artisan vendor:publish --tag=articles_config

php artisan vendor:publish --tag=articles_public