This is a code snippet sharing web application written in PHP using Laravel 5.2. It is inspired by http://pastebin.com
- Clone this repository and then
cd snippet/snippet
- Make sure you have Composer installed somewhere.
- Run
composer install
to install all software packages dependencies. - Create a virtual host on your web server then point public directory as Document Root.
- Rename
.env.example
file to.env
file - From shell run
php artisan app:key
to generate application key (seeAPP_KEY
in .env file) - Create a MySQL database and user that has priviledge to basic CRUD, and create table.
- Edit .env file and change
DB_HOST
,DB_DATABASE
,DB_USERNAME
,DB_PASSWORD
according to your database configuration. - From shell run
php artisan migrate:install
to setup table. - From shell run
composer dumpautoload
to generate autoload file (optional).
Users are able to paste their code snippet and will receive short URL that point to their code snippet.
This application use :
- Laravel 5.2 (http://laravel.com)
- Bootstrap 3.3.6 (http://getbootstrap.org)
- Highlight.js (http://highlightjs.org)
That's it. If you add new cool features, feel free to submit PR.
Zamrony P. Juhara Send me email or Tweet me at @zpjuhara