Skip to content
A Laravel publishing platform
PHP Vue
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
database/migrations
public
resources
src
stubs
tests
.editorconfig
.gitattributes
.gitignore
.styleci.yml
.travis.yml
changelog.md
composer.json
license
package.json
phpunit.xml.dist
readme.md
sponsors.md
webpack.mix.js
yarn.lock

readme.md




Introduction

A Laravel publishing platform. Canvas is a fully open source package to extend your application and get you up-and-running with a blog in just a few minutes. In addition to a distraction-free writing experience, you can view monthly trends on your content, get insights into reader traffic and more!

Installation

Note: Canvas requires you to have user authentication in place prior to installation. You may run the make:auth Artisan command to satisfy this requirement.

You may use composer to install Canvas into your Laravel project:

composer require cnvs/canvas

Publish the assets and primary configuration file using the canvas:install Artisan command:

php artisan canvas:install

Create a symbolic link to ensure file uploads are publicly accessible from the web using the storage:link Artisan command:

php artisan storage:link

Configuration

Note: The following steps are optional configurations, you are not required to complete them.

Want to get started fast? Just run php artisan canvas:setup after installing Canvas. A --data option may also be included in the command to generate demo data. Then, navigate your browser to http://your-app.test/blog or any other URL that is assigned to your application. This command scaffolds a default frontend for your entire blog!

If you want to include Unsplash images in your post content, set up a new application at https://unsplash.com/oauth/applications. Grab your access key and update config/canvas.php:

'unsplash' => [
    'access_key' => env('CANVAS_UNSPLASH_ACCESS_KEY'),
],

Want a weekly summary? Canvas provides support for a weekly e-mail that gives you quick stats of the content you've authored, delivered straight to your inbox. Once your application is configured for sending mail, update config/canvas.php:

'mail' => [
    'enabled' => env('CANVAS_MAIL_ENABLED', false),
],

Since the weekly digest runs on Laravel's Scheduler, you'll need to add the following cron entry to your server:

* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1

Updates

You may update your Canvas installation using composer:

composer update

Run any new migrations using the migrate Artisan command:

php artisan migrate

Re-publish the assets using the canvas:publish Artisan command:

php artisan canvas:publish

Testing

Run the tests with:

composer test

License

Canvas is open-sourced software licensed under the MIT license.

Credits

You can’t perform that action at this time.