If you wish to edit something in the JavaScript/Sass files, you have to compile them with Laravel Elixir.

From your terminal, cd into the comments directory, then install Laravel Elixir (npm install).

Now you can edit the JavaScript/Sass files and run Elixir with gulp or gulp watch.

Each time the assets are compiled you have to run php artisan vendor:publish --tag="public" --force to override them in your public directory.

Or you edit the gulpfile.js and change the jsDest and cssDest variables:

var jsDest  = '../../public/vendor/comments/js/';
var cssDest = '../../public/vendor/comments/css/';

Assuming that you have the comments folder in your app directory.

To enable the source maps set elixir.config.sourcemaps = true; in the gulpfile.js.


If you wish to customize the views copy the view files from comments/resources/views to resources/vendor/comments and edit there.


See Overriding Vendor Language Files.

Not Found Exceptions

To catch ModelNotFoundException exceptions edit app/Exceptions/Handler.php and add in the render method:

public function render($request, Exception $e)
    if ($e instanceof \Illuminate\Database\Eloquent\ModelNotFoundException && $request->ajax()) {
        return response()->json('Not found.', 404);

    return parent::render($request, $e);