Ever wanted to play around the famous bootstrap blog live? This project is a fully functional blog application based on the bootstrap blog template and the bootstrap 3 adminsb theme for the admin area. It is written in PHP using Laravel 5.4 as a framework. It takes advantage of Laravel built-in authentication and adds a minimal number of highly recommended external packages, so that you're free to expand the blog as you like! No fancy visual effects, no weird plug-ins, no complex backend code, just a clean and expandable blogging platform!
You need to have a local server working on your computer to run this project locally. I recommand you initialize a complete local development environment with Homestead but you can also use Xampp, which is more straightforward to install on a windows machine. So first make sure a local server is running on your computer. Next create the database on which blog posts will reside (for example using phpmyadmin). Then type the following commands in your favorite CLI (xampp users: make sure your emplacement is the xampp/htdocs folder):
Clone the repo:
git clone https://github.com/jeanquark/bootstap-blog.git
Move to the newly created folder and install all dependencies:
cd bootstrap-blog
composer install
Open the .env.example file, edit it to match your database name, username and password (required step) as well as your email credentials (optional, but required for the contact form to work) and save it as .env file. Then build tables with command:
php artisan migrate
Now fill the tables:
php artisan db:seed
Generate application key
php artisan key:generate
And voilà! Now you should be able to test the application. Go to the login page and enter the provided credentials. Then click on the top nav email address to get to the admin area and... enjoy!
- Create blog posts that consist of formatted text and images.
- Link those posts to tags for quick reference.
- Allow posts to be commented and comments to be replied.
- Search among posts based on text excerpt.
- Send a message with the contact form.
Submitted messages from the contact form are saved in the database. However, you can also make sure they're sent to your email address by commenting out proper lines in the HomeContoller. I have preconfigured a Gmail address in the .env.example file. All you have to do is entering your actual email address and password!
- image-validator for image upload validation
- markdown for clean writing in Markdown
- hashids for quick hash of user ids
- active for active class on current url
This app comes with full integration tests. Simply run:
phpunit
Replies to comments, which involve JavaScript, can be properly tested with Laravel Dusk. I have written a special test for this purpose. Just run:
php artisan dusk
Please refer to the bootstrap blog license.
Visit my blog: www.jmkleger.com