nord/comment

There is no license information available for the latest version (1.0.6) of this package.

Comment crud for laravel

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Language:JavaScript

1.0.6 2019-03-20 13:32 UTC

README

Installation

  1. Include the package in your project

    composer require "nord/comment"
    
  2. Add the service provider to your config/app.php providers array:

    If you're installing on Laravel 5.5+ skip this step

    Nord\Comment\CommentServiceProvider::class,
    
  3. Publish the Vendor Assets files by running:

    php artisan vendor:publish --provider="Nord\Comment\CommentServiceProvider"
    
  4. Now that we have published a few new files to our application we need to reload them with the following command:

    composer dump-autoload
    
  5. Run Your migrations:

    php artisan migrate
    

    Quick tip: Make sure that you've created a database and added your database credentials in your .env file.

  6. Inside of your master.blade.php file include a css and js link. Inside the head of your master or app.blade.php add the following:

    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css">
    <link rel="stylesheet" href="{{ asset('vendor/nord/comment/css/main.css') }}">
    

    Then, right above the </body> tag of your master file add the following:

    <script src="{{ asset('vendor/nord/comment/js/main.js') }}"></script>
    
  7. Inside the body of your master or app.blade.php add the comment yield:

 <div id="comment">
        @yield('comment')
        <flash message="{{ session('flash') }}"></flash>        
    </div>
  1. Inside any blade page when you want to add a comment, just add:
    @section('comment')
     <comments></comments>
    @endsection
    

That's all !!! Enjoy !!!

Issues

Compatibility problem with app.js on master blade, Problem being resolved, for now remove the app.js link

<script src="{{ asset('js/app.js') }}"></script>