A straightforward blog page written in PHP/Laravel.
The website was built with PHP, MySQL, and Laravel. It allows you to go through every post that is on the main page. You can add comments. You have complete control while logged in as an administrator, including the ability to create, edit, and delete posts, users, and comments, as well as manage roles. There are two positions available: administrator and writer. Default permissions for Writer are: adding or editing owned posts; deleting comments in your posts. Furthermore, you can save posts, continue writing later, and then publish them. Also, you are able to send emails to users after updating their accounts.
Furthermore, the website is fully responsive.
I tried to add the best protection I could to this website. I'm referring to prohibitions against deleting other people's posts besides the "Admin" account, deleting roles owned by others or the "Admin" role, deleting yourself, and even editing another person's account.
- Laravel 9.45.1
- Blade
- PHP 8.1.7
- MySQL 8.0.29
- HTML 5
- CSS 3
- JavaScript
- SweetAlert 2
- FontAwesome 6.5.1
To run this project you will need to install PHP, MySQL, Composer, NPM on your local machine.
If you have everything, you can run these commands:
# Clone this respository
> git clone https://github.com/Mati822456/Laravel-Blog-Website.git
# Go into the folder
> cd Laravel-Blog-Website
# Install dependencies from lock file
> composer install
# Install packages from package.json
> npm install
# Compile assets
> npm run build
Create or copy the .env file and configure it. e.g., db_username, db_password, db_database
You will need to configure SMTP in order to send emails.
# Generate APP_KEY
> php artisan key:generate
# Run migrations if you have created database
> php artisan migrate
# Run seeder to create Permissions, Admin and Writer users and 10 random posts
> php artisan db:seed
# Start server
> php artisan serve
# Access using
http://localhost:8000
Now you can login using created accounts:
Role: Admin
Email: admin@db.com
Password: admin1234
Role: Writer
Email: writer@db.com
Password: writer1234
Name | Status | Date added |
---|---|---|
Version control of each post | ☑ Finished | 2023-05-10 |
Tiles on the home page | ☑ Finished | 2023-12-03 |
Improve post creation/editing UI | ☑ Finished | 2023-12-06 |
Categories | ☑ Finished | 2023-12-09 |
Reading time | ☑ Finished | 2023-12-21 |
Pinned post | ☑ Finished | 2024-01-01 |
Better tiles in history | ☑ Finished | 2024-01-04 |
Changelog for posts | ☑ Finished | 2024-01-04 |
History post comparison | ☑ Finished | 2024-01-10 |
Remove jQuery | ☑ Finished | 2024-01-11 |
Dark mode | ☑ Finished | 2024-01-15 |
More filtering | ☑ Finished | 2024-01-18 |
Auto-save editing post | ☑ Finished | 2024-01-23 |
Observer on main page | ☑ Finished | 2024-01-28 |
Super-permissions | ☑ Finished | 2024-02-05 |
Image Browser | ☑ Finished | 2024-02-09 |
Enhance image selection | ☑ Finished | 2024-02-10 |
Notifications | ☑ Finished | 2024-02-12 |
Thanks User icons created by kmg design - Flaticon for the user profile icon
Thanks Email icons created by Freepik - Flaticon for the envelope icon on the contact page
Thanks Blog icons created by zero_wing - Flaticon for the blog icon as favicon
Feel free to contact me via email mateusz.zaborski1@gmail.com. :D