Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gjerokrsteski/pimf-blog-mysql
Simple Blog with PIMF micro framework using MySQL and SQLite database
https://github.com/gjerokrsteski/pimf-blog-mysql
learning-pimf mysql pdo php pimf-framework sqlite-database
Last synced: about 4 hours ago
JSON representation
Simple Blog with PIMF micro framework using MySQL and SQLite database
- Host: GitHub
- URL: https://github.com/gjerokrsteski/pimf-blog-mysql
- Owner: gjerokrsteski
- Created: 2014-01-14T10:58:02.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-09-14T13:42:44.000Z (about 7 years ago)
- Last Synced: 2023-03-27T16:53:02.571Z (over 1 year ago)
- Topics: learning-pimf, mysql, pdo, php, pimf-framework, sqlite-database
- Language: PHP
- Homepage:
- Size: 28.3 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Welcome to PIMF Blog bundle using MySQL
=======================================
This Blog is a run ready bundle, which uses PIMF framework including a blog application based on MySQL database.
The session will be stored at SQLite database. Here you can learn how to work with Pimf\EntityManager, Pimf\Util\Validator
and Pimf\View.System Requirements
-------------------
This bundle has system requirements to PHP's extensions: "PDO", "pdo_mysql" and "pdo_sqlite". The extentions
have to be compiled within your PHP. Please check by executing **php -m** on you command interface - and
take a look for them. If they are there than everything will be fine - otherwise please navigate
to http://www.php.net/manual/pdo.setup.php and find out how to recompile them to your PHP version.Installation & Configuration
----------------------------1.) Clone the repository
```cli
git clone --recursive https://github.com/gjerokrsteski/pimf-blog-mysql.git
```2.) Change to the root directory
```cli
cd pimf-blog-mysql/
```3.) Update all submodules
```cli
git submodule --quiet sync
git submodule --quiet update --force --init --recursive
```4.) Please configure your database connection at **app/MyFirstBlog/config.app.php** according to you system needs.
```php
/*
|------------------------------------------------------------------------
| Production environment settings
|------------------------------------------------------------------------
*/
'production' => array(
'db' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'db_blog',
'username' => 'root',
'password' => '',
),
),
```5.) Create a blog database and table. Please execute this at you MySQL.
```sql
CREATE DATABASE IF NOT EXISTS db_blog;USE db_blog;
CREATE TABLE IF NOT EXISTS blog (
`id` INTEGER(10) PRIMARY KEY AUTO_INCREMENT,
`title` VARCHAR(50) NOT NULL,
`content` TEXT NOT NULL
) ENGINE=InnoDB;
```6.) Initialize PIMF and follow the instructions
```cli
php pimf core:init
```7.) Finally create one or more test entries at your blog.
```cli
php pimf blog:insert
```8.) Navigate to your application in a web browser. If all is well, you should see a pretty PIMF splash page. Get ready - there is lot more to learn!
Alternatively you can run the PHP's built-in web server that is provided since PHP 5.4.0
```php
php -S 127.0.0.1:1337
```Please notice: this web server was designed to aid application development. It may also be useful for testing purposes or for
application demonstrations that are run in controlled environments. It is not intended to be a full-featured web server.
It should not be used on a public network.Learning PIMF
-------------
One of the best ways to learn PIMF is to read through the entirety of its documentation. This guide details all aspects of the framework and how to apply them to your application. https://github.com/gjerokrsteski/pimf/wikiRead the PIMF book almost anywhere. Available as a PDF, EPUB and MOBI. You can now read it on all devices, as well as offline: https://leanpub.com/pimf-starter/