Welcome to a series of Deploying a Laravel Application.
Laravel applications are deployed on many sites.
I will be taking you through on how to deploy a laravel application which has a database and to be specific, Postgresql Database.
| <?php | |
| /* | |
| * DatabaseUtils.php - A class of simple database utilities. | |
| * | |
| * Performs CRUD operations using PDO (MySQL) prepared statements. | |
| * | |
| * Author: bencentra (https://gist.github.com/bencentra/92228e1f4139436c4153) | |
| */ |
| <?php | |
| /** | |
| * PDO Singleton Class v.1.0 | |
| * | |
| * @author Ademílson F. Tonato | |
| * @link https://twitter.com/ftonato | |
| * | |
| */ | |
| class DB { |
| <!DOCTYPE html> | |
| <html lang="pt-BR"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Título</title> | |
| <style> | |
| footer { | |
| text-align:center; |
Other people's projects:
My projects (tutorials are on my blog at http://maxoffsky.com):
| <?php | |
| // we're loading the Database TestCase here | |
| require 'PHPUnit' . DIRECTORY_SEPARATOR . 'Extensions' . | |
| DIRECTORY_SEPARATOR . 'Database' . DIRECTORY_SEPARATOR . | |
| 'TestCase.php'; | |
| class FixtureTestCase extends PHPUnit_Extensions_Database_TestCase { | |
| public $fixtures = array( | |
| 'posts', |
| <?php | |
| class Pai | |
| { | |
| protected $name = 'João Brito'; | |
| } | |
| class Filho extends Pai | |
| { | |
| // A propriedade protected na classe pai pode ser acessada pela classe filha | |
| // Mas não pode ser acessada diretamente por um objeto da classe filha |
| <?php | |
| /* | |
| * PDO DATABASE CLASS | |
| * Connects Database Using PDO | |
| * Creates Prepeared Statements | |
| * Binds params to values | |
| * Returns rows and results | |
| */ | |
| class Database { | |
| private $host = DB_HOST; |
TL;DR do what the last section tells you to do
An absolute path is one which includes all path components from the root of the file system. It starts with a leading
/ on unix-like operating systems, or a drive letter on Windows.
Unix: /full/path/to/file.php
Windows C:\full\path\to\file.php