Monthly Archives: July 2015

Object Oriented PHP

Some links to reading material on OO PHP

http://code.tutsplus.com/tutorials/object-oriented-php-for-beginners–net-12762

http://knowpapa.com/procedural-to-oop/

http://www.davegardner.me.uk/blog/2010/11/21/why-you-should-always-use-php-interfaces/

 

Defining relationships in databases

http://blog.andreasartori.me/defining-relationships-among-database-tables-with-eloquent/

 

Learning a MVC framework : laravel 5

Some useful links:

http://laravel.com/docs/5.0/helpers#urls

call custom files (php or otherwise) into a laravel project. For me app.php file to which I added

'Helpers'   => 'app\TradeLogic\engine'

was in config/app.php

The app.php file didn’t help.

What actually worked was adding :

include_once (__DIR__.'/../resources/views/engine.php');

to the file bootstrap/autoload.php
The path shown is from the location of the autoload file.

 

Migrations

To drop a column, need to run “composer require doctrine/dbal” otherwise a rollback that drops a column will fail.

If the filename of a migration got changed, or it got deleted, the ‘php artisan migrate’ command will complain. Need to run ‘composer dumpautoload’ shich will fix things.