A quickie for a project on IT22-FA3, built with Laravel.
As of Mar 15, 2015, this project has been rewritten from scratch.
- PHP
>=5.4
- MySQL
~5.5
- Composer
- Bower (which requires
npm
andnodejs
)
[1] Clone the repository.
$ git clone https://github.com/srph/e-dental.git
# switch the current direct to the cloned repository
$ cd e-dental
[2] Update dependencies
# Install PHP dependencies
$ composer install
# Install Bower (static assets) dependencies
$ bower install
[3] Installing the database
Create a database on MySQL first.
mysql -u root -p
CREATE DATABASE `edms`;
And then, register your machine to the list of detected environment at bootstrap/start.php
:
/*
|--------------------------------------------------------------------------
| Detect The Application Environment
|--------------------------------------------------------------------------
|
| Laravel takes a dead simple approach to your application environments
| so you can just specify a machine name for the host that matches a
| given environment, then we will automatically detect it for you.
|
*/
$env = $app->detectEnvironment(array(
// Other environment..
'your-environment-name' => array('your-machine-name'),
));
* Replace your-environment-name
with any unique name (this will be used to identify which environment (or configurations) to use), and your-machine-name
of course the computer name.
Proceed to the configurations located at app/config/
to create your own folder (the same as your environment name). And then create database.php
on the same folder (now, you have app/config/myMachine/database.php
).
Paste this in:
<?php
return array(
'default' => 'mysql',
'connections' => array(
'mysql' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'edms', // YOUR PREFERRED DB NAME
'username' => 'forge', // YOUR MYSQL USERNAME
'password' => 'forge', // YOUR MYSQL PASS
/** reduced for bevity */
),
)
);
Run the migrations.
# on your root folder
$ php artisan migrate # run the table migration
$ php artisan db:seed # seed data
- Bad UX overall.
- Bad practices all over the place.
Do not read this shit for Best Practices™ . Thanks.
e-dental © 2014+, Kier Borromeo (srph). Released under the MIT License.
srph.github.io · GitHub @srph · Twitter @_srph