jeudi 9 janvier 2020

Blog Etc Plugin show 404 when try to acces routes

I'm using the plugin Blog Etc over Laravel. The instalation work well (when i clear cache). But when i finish all the steps to install it i try to acces to the routes. ¡Surprise!

The problem it's that the routes doesn't exist (should be exist the routes: /blog and /blog_admin). I read the instalations steps again and it don't explain how create the routes (and isn't necessary to do, according to the installation tutorial).

I proceed to explain my actions:

  1. composer require "webdevetc/blogetc"
  2. php artisan vendor:publish --provider="WebDevEtc\BlogEtc\BlogEtcServiceProvider"
  3. php artisan vendor:publish --tag=laravel-fulltext
  4. php artisan migrate;
  5. Add the method:

    public function canManageBlogEtcPosts()
    {
        // Enter the logic needed for your app.
        // Maybe you can just hardcode in a user id that you
        //   know is always an admin ID?
    
        if (       $this->id === 1
             && $this->email === "your_admin_user@your_site.com"
           ){
    
           // return true so this user CAN edit/post/delete
           // blog posts (and post any HTML/JS)
    
           return true;
        }
    
        // otherwise return false, so they have no access
        // to the admin panel (but can still view posts)
    
        return false;
    }
    
  6. Create a directory: public/blog_images/
  7. Now i try to access to the routes

Can I solve the problem? Can I create the routes manually?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire