Customization

Assets

If you wish to edit something in the JavaScript (or less) files, you have to compile them with Laravel Elixir.

From your terminal/console cd into the comments directory and install Laravel Elixir there.

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

Each time you compile the assets you have to run php artisan vendor:publish --tag="public" --force to override the compiled assets (or change the jsDest and cssDest variables in the gulpfile.js file).

Views

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

Translations

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);
}