[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-8523":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":28,"readmeContent":29,"aiSummary":30,"trendingCount":16,"starSnapshotCount":16,"syncStatus":18,"lastSyncTime":31,"discoverSource":32},8523,"canvas","austintoddj\u002Fcanvas","austintoddj","Publishing on your own terms","http:\u002F\u002Ftrycanvas.app",null,"PHP",3348,521,83,19,0,1,2,60.85,"MIT License",false,"master",[24,5,25,26,27],"blog","laravel","platform","publishing","2026-06-12 04:00:40","\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Ftrycanvas.app\">\n        \u003Cimg src=\".github\u002Fdocs\u002Fheader.png\" alt=\"Homepage for trycanvas.app\">\n    \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Faustintoddj\u002Fcanvas\u002Factions\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Faustintoddj\u002Fcanvas\u002Fworkflows\u002Ftests\u002Fbadge.svg\" alt=\"Build Status\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpackagist.org\u002Fpackages\u002Faustintoddj\u002Fcanvas\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpackagist\u002Fdt\u002Faustintoddj\u002Fcanvas\" alt=\"Total Downloads\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpackagist.org\u002Fpackages\u002Faustintoddj\u002Fcanvas\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpackagist\u002Fv\u002Faustintoddj\u002Fcanvas\" alt=\"Latest Stable Version\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpackagist.org\u002Fpackages\u002Faustintoddj\u002Fcanvas\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpackagist\u002Fl\u002Faustintoddj\u002Fcanvas\" alt=\"License\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n## Introduction\n\nCanvas is a fully open source package to extend your existing [Laravel](https:\u002F\u002Flaravel.com) 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!\n\n## System Requirements\n\n- PHP >= 7.3\n- Laravel >= 6.0\n- One of the [five supported databases](https:\u002F\u002Flaravel.com\u002Fdocs\u002F10.x\u002Fdatabase#introduction) by Laravel\n\n## Installation\n\nYou may use composer to install Canvas into your Laravel project:\n\n```bash\ncomposer require austintoddj\u002Fcanvas\n```\n\nPublish the assets and primary configuration file using the `canvas:install` Artisan command:\n\n```bash\nphp artisan canvas:install\n```\n\nCreate a symbolic link to ensure file uploads are publicly accessible from the web using the `storage:link` Artisan command:\n\n```bash\nphp artisan storage:link\n```\n\n## Configuration\n\nAfter publishing Canvas's assets, a primary configuration file will be located at `config\u002Fcanvas.php`. This file allows you to customize various aspects of how your application uses the package.\n\nCanvas exposes its UI at `\u002Fcanvas` by default. This can be changed by updating either the `path` or `domain` option:\n\n```php\n\u002F*\n|--------------------------------------------------------------------------\n| Base Domain\n|--------------------------------------------------------------------------\n|\n| This is the subdomain where Canvas will be accessible from. If the\n| domain is set to null, Canvas will reside under the defined base\n| path below. Otherwise, this will be used as the subdomain.\n|\n*\u002F\n\n'domain' => env('CANVAS_DOMAIN', null),\n\n\u002F*\n|--------------------------------------------------------------------------\n| Base Path\n|--------------------------------------------------------------------------\n|\n| This is the URI where Canvas will be accessible from. If the path\n| is set to null, Canvas will reside under the same path name as\n| the application. Otherwise, this is used as the base path.\n|\n*\u002F\n\n'path' => env('CANVAS_PATH_NAME', 'canvas'),\n```\n\nSometimes, you may want to apply custom roles or permissions when accessing Canvas. You can create and attach any additional middleware here:\n\n```php\n\u002F*\n|--------------------------------------------------------------------------\n| Route Middleware\n|--------------------------------------------------------------------------\n|\n| These middleware will be attached to every route in Canvas, giving you\n| the chance to add your own middleware to this list or change any of\n| the existing middleware. Or, you can simply stick with the list.\n|\n*\u002F\n\n'middleware' => [\n    'web',\n],\n```\n\nCanvas uses the storage disk for media uploads. You may configure the different filesystem options here:\n\n```php\n\u002F*\n|--------------------------------------------------------------------------\n| Storage\n|--------------------------------------------------------------------------\n|\n| This is the storage disk Canvas will use to put file uploads. You may\n| use any of the disks defined in the config\u002Ffilesystems.php file and\n| you may also change the maximum upload size from its 3MB default.\n|\n*\u002F\n\n'storage_disk' => env('CANVAS_STORAGE_DISK', 'local'),\n\n'storage_path' => env('CANVAS_STORAGE_PATH', 'public\u002Fcanvas'),\n\n'upload_filesize' => env('CANVAS_UPLOAD_FILESIZE', 3145728),\n```\n\n## Roles & Permissions\n\nCanvas comes with 3 pre-defined roles out-of-the-box:\n\n- **Contributor** (A user who can write and manage their own posts but cannot publish them)\n- **Editor** (A user who can publish and manage posts including the posts of other users)\n- **Admin** (A user who can do everything and see everything)\n\nWhen you install a fresh version of Canvas, you'll have a default admin user set up automatically. From there, you can perform any basic CRUD actions on users, as well as assign their various roles.\n\n## Canvas UI\n\n**Want a beautiful, Medium.com-inspired frontend?** Use the `canvas:ui` Artisan command to install the scaffolding:\n\n```bash\nphp artisan canvas:ui\n```\n\nAfter generating the frontend scaffolding, your `package.json` file will include the necessary dependencies to install and compile:\n\n```bash\n# Using NPM\nnpm install\nnpm run dev\n\n# Using Yarn\nyarn\nyarn dev\n```\n\nThat's it! You can navigate to `\u002Fcanvas-ui` and check it out for yourself. You're free to modify any aspect of it\nthat you'd like.\n\n## Unsplash Integration\n\n**Want access to the entire [Unsplash](https:\u002F\u002Funsplash.com) library?** Set up a new application at [https:\u002F\u002Funsplash.com\u002Foauth\u002Fapplications](https:\u002F\u002Funsplash.com\u002Foauth\u002Fapplications), grab your access key, and update `config\u002Fcanvas.php`:\n\n```php\n\u002F*\n|--------------------------------------------------------------------------\n| Unsplash Integration\n|--------------------------------------------------------------------------\n|\n| Visit https:\u002F\u002Funsplash.com\u002Foauth\u002Fapplications to create a new Unsplash\n| app. Use the confidential Access Key given to you to integrate with\n| the API. Note that demo apps are limited to 50 requests per hour.\n|\n*\u002F\n\n'unsplash' => [\n    'access_key' => env('CANVAS_UNSPLASH_ACCESS_KEY'),\n]\n```\n\n## E-mail Notifications\n\n**Want a weekly summary?** Canvas allows users to receive a weekly digest of their authored content. Once your application is [configured for sending mail](https:\u002F\u002Flaravel.com\u002Fdocs\u002F10.x\u002Fmail), update `config\u002Fcanvas.php`:\n\n```php\n\u002F*\n|--------------------------------------------------------------------------\n| E-Mail Notifications\n|--------------------------------------------------------------------------\n|\n| This option controls e-mail notifications that will be sent via the\n| default application mail driver. A default option is provided to\n| support the notification system as an opt-in feature.\n|\n|\n*\u002F\n\n'mail' => [\n    'enabled' => env('CANVAS_MAIL_ENABLED', false),\n]\n```\n\nSince this feature runs on [Laravel's Scheduler](https:\u002F\u002Flaravel.com\u002Fdocs\u002F10.x\u002Fscheduling), you'll need to add the \nfollowing cron entry to your server:\n\n```bash\n* * * * * cd \u002Fpath-to-your-project && php artisan schedule:run >> \u002Fdev\u002Fnull 2>&1\n```\n\n## API\n\nInstalling [Canvas UI](#canvas-ui) will be the most efficient way to get up and running with a frontend interface to display your data. However many users will opt for creating this by hand since it gives flexibility to their design aesthetic.\n\nUsing the `published` scope will allow you to only retrieve posts that have a published date in the past:\n\n```php\nCanvas\\Models\\Post::published()->get()\n```\n\nYou can also retrieve the inverse with a `draft` scope:\n\n```php\nCanvas\\Models\\Post::draft()->get()\n```\n\nTo return a single post, you'll likely want to find it by a given slug, as well as include related entities such as:\n\n```php\n$post = Canvas\\Models\\Post::with('user', 'tags', 'topic')->firstWhere('slug', $slug);\n```\n\n> **Important:** In the same method that returns a post, make sure you fire the `PostViewed` event, or else a \n> view\u002Fvisit will not be recorded.\n\n```php\nevent(new Canvas\\Events\\PostViewed($post));\n```\n\nYou can find a tag by a given slug:\n\n```php\nCanvas\\Models\\Tag::with('posts')->firstWhere('slug', $slug);\n```\n\nAnd a similar query can be used for a topic:\n\n```php\nCanvas\\Models\\Topic::with('posts')->firstWhere('slug', $slug);\n```\n\nUsers can be retrieved by their `id`, `username`, or `email`:\n\n```php\n$user = Canvas\\Models\\User::find($id);\n$user = Canvas\\Models\\User::firstWhere('username', $username);\n$user = Canvas\\Models\\User::firstWhere('email', $email);\n```\n\nAdditionally, you can return the users' published posts with their associated topic:\n\n```php\n$user->posts()->published()->with('topic')\n```\n\n## Updates\n\nCanvas follows [Semantic Versioning](https:\u002F\u002Fsemver.org) and increments versions as `MAJOR.MINOR.PATCH` numbers.\n- Major versions **will** contain breaking changes, so follow the [upgrade guide](.github\u002FUPGRADE.md) for a\n  step-by-step breakdown\n- Minor and patch versions should **never** contain breaking changes, so you can safely update the package by following the steps below:\n\nYou may update your Canvas installation using composer:\n\n```bash\ncomposer update\n```\n\nRun any new migrations using the `canvas:migrate` Artisan command:\n\n```bash\nphp artisan canvas:migrate\n```\n\nRe-publish the assets using the `canvas:publish` Artisan command:\n\n```bash\nphp artisan canvas:publish\n```\n\nTo keep the assets up-to-date and avoid issues in future updates, you may add the `canvas:publish` command to the `post-update-cmd` scripts in your application's `composer.json` file:\n\n```bash\n{\n    \"scripts\": {\n        \"post-update-cmd\": [\n            \"@php artisan canvas:publish --ansi\"\n        ]\n    }\n}\n```\n\n## Contributing\n\nThank you for considering contributing to Canvas! The [contribution guide can be found here](https:\u002F\u002Fgithub.com\u002Faustintoddj\u002Fcanvas\u002Fblob\u002Fmaster\u002F.github\u002FCONTRIBUTING.md).\n\n## Testing\n\nRun the tests with:\n\n```bash\ncomposer test\n```\n\n## Troubleshooting\n\nIf you're running into problems, feel free to [open a new issue](https:\u002F\u002Fgithub.com\u002Faustintoddj\u002Fcanvas\u002Fissues) or check the [Discussions](https:\u002F\u002Fgithub.com\u002Faustintoddj\u002Fcanvas\u002Fdiscussions) forum to see if anyone else has run into something similar.\n\n## License\n\nCanvas is open-sourced software licensed under the [MIT license](license).\n\n## Credits\n\n- [@austintoddj](https:\u002F\u002Ftwitter.com\u002Faustintoddj)\n- [@talvbansal](https:\u002F\u002Ftwitter.com\u002Ftalv)\n- [@reliq](https:\u002F\u002Ftwitter.com\u002FIAmReliq)\n- [@mithicher](https:\u002F\u002Ftwitter.com\u002Fmithicher)\n- [@themsaid](https:\u002F\u002Ftwitter.com\u002Fthemsaid)\n- [@NinaLimpi](https:\u002F\u002Ftwitter.com\u002FNinaLimpi)\n\n","Canvas 是一个基于 Laravel 框架的开源博客系统，能够快速将现有的 Laravel 应用扩展为功能完备的博客平台。其核心功能包括提供无干扰的写作环境、内容趋势分析以及读者流量洞察等。项目采用 PHP 语言编写，并支持 Laravel 官方推荐的五种数据库之一作为后端存储。Canvas 适用于需要在已有 Laravel 项目基础上添加博客功能的场景，无论是个人博主还是企业级应用都能轻松集成使用。通过 Composer 安装和简单的配置步骤即可完成部署。","2026-06-11 03:18:26","top_language"]