This php Blog system has a MVC pattern, use Twig v2.0 (Required php 7.0), Namespaces, Bootstrap v3.3, jQuery v3.2, and PDO.
I built this project for my php oop learning with OpenClassRooms.
- Local server environment or live server
- PHP v7.0
- MySQL v5.0 or higher
- Clone or download the repository, and put files into your environment
https://github.com/natinho68/phpBlog.git
- Import or create a database with the same structure as the file blog.sql in the root folder of the project.
- Edit the Database.php class in app/Natinho68/Config/Database.php with your connection informations to the database
/**
* Constant: username of db
*
* @var string
*/
const DEFAULT_SQL_USER = 'root';
/**
* Constant: host of db
*
* @var string
*/
const DEFAULT_SQL_HOST = 'localhost';
/**
* Constant: password of db
*
* @var string
*/
const DEFAULT_SQL_PASS = 'root';
/**
* Constant: name of db
*
* @var string
*/
const DEFAULT_SQL_DTB = 'blogtwig';
- Go into "Blog" in the nav bar and see if you get your blog posts.
- Composer - Used for dependency manager
- Twig - Used for template engine
- Bootstrap - Used for design and responsive
- jQuery - Used for animations
- Google fonts - Used for polices
- Freepik - Used for illustrations images
See also ismail1432 who helps me a lot in this project.