Skip to content
davidnknight edited this page Apr 4, 2014 · 4 revisions
  1. Clone the repo

    git@github.com:basco-johnkevin/laravelsnippets.git

  2. OPTIONAL: Create app/config/local/app.php if you would like to turn debug on. (recommended)

    <?php
    return array(
        'debug' => true
    );
  3. OPTIONAL: Create app/config/local/app.php if you would like to turn debug on AND use the Profiler:

    <?php
    return array(
    
        'debug' => true,
    
        'providers' => array(
    
            'Illuminate\Foundation\Providers\ArtisanServiceProvider',
            'Illuminate\Auth\AuthServiceProvider',
            'Illuminate\Cache\CacheServiceProvider',
            'Illuminate\Foundation\Providers\CommandCreatorServiceProvider',
            'Illuminate\Session\CommandsServiceProvider',
            'Illuminate\Foundation\Providers\ComposerServiceProvider',
            'Illuminate\Routing\ControllerServiceProvider',
            'Illuminate\Cookie\CookieServiceProvider',
            'Illuminate\Database\DatabaseServiceProvider',
            'Illuminate\Encryption\EncryptionServiceProvider',
            'Illuminate\Filesystem\FilesystemServiceProvider',
            'Illuminate\Hashing\HashServiceProvider',
            'Illuminate\Html\HtmlServiceProvider',
            'Illuminate\Foundation\Providers\KeyGeneratorServiceProvider',
            'Illuminate\Log\LogServiceProvider',
            'Illuminate\Mail\MailServiceProvider',
            'Illuminate\Foundation\Providers\MaintenanceServiceProvider',
            'Illuminate\Database\MigrationServiceProvider',
            'Illuminate\Foundation\Providers\OptimizeServiceProvider',
            'Illuminate\Pagination\PaginationServiceProvider',
            'Illuminate\Foundation\Providers\PublisherServiceProvider',
            'Illuminate\Queue\QueueServiceProvider',
            'Illuminate\Redis\RedisServiceProvider',
            'Illuminate\Auth\Reminders\ReminderServiceProvider',
            'Illuminate\Foundation\Providers\RouteListServiceProvider',
            'Illuminate\Database\SeedServiceProvider',
            'Illuminate\Foundation\Providers\ServerServiceProvider',
            'Illuminate\Session\SessionServiceProvider',
            'Illuminate\Foundation\Providers\TinkerServiceProvider',
            'Illuminate\Translation\TranslationServiceProvider',
            'Illuminate\Validation\ValidationServiceProvider',
            'Illuminate\View\ViewServiceProvider',
            'Illuminate\Workbench\WorkbenchServiceProvider',
            'Illuminate\Remote\RemoteServiceProvider',
    
            // app specific
            'LaraSnipp\Repo\RepoServiceProvider',
            'LaraSnipp\Service\Form\FormServiceProvider',
            'LaraSnipp\Observer\ObserverServiceProvider',
            'LaraSnipp\LaraSnippServiceProvider',
    
            // 3rd party
            'Cviebrock\EloquentSluggable\SluggableServiceProvider',
            'Profiler\ProfilerServiceProvider',
    
        ),
    
        'aliases' => array(
    
            'App'         => 'Illuminate\Support\Facades\App',
            'Artisan'     => 'Illuminate\Support\Facades\Artisan',
            'Auth'        => 'Illuminate\Support\Facades\Auth',
            'Blade'       => 'Illuminate\Support\Facades\Blade',
            'Cache'       => 'Illuminate\Support\Facades\Cache',
            'ClassLoader' => 'Illuminate\Support\ClassLoader',
            'Config'      => 'Illuminate\Support\Facades\Config',
            'Controller'  => 'Illuminate\Routing\Controller',
            'Cookie'      => 'Illuminate\Support\Facades\Cookie',
            'Crypt'       => 'Illuminate\Support\Facades\Crypt',
            'DB'          => 'Illuminate\Support\Facades\DB',
            'Eloquent'    => 'Illuminate\Database\Eloquent\Model',
            'Event'       => 'Illuminate\Support\Facades\Event',
            'File'        => 'Illuminate\Support\Facades\File',
            'Form'        => 'Illuminate\Support\Facades\Form',
            'Hash'        => 'Illuminate\Support\Facades\Hash',
            'HTML'        => 'Illuminate\Support\Facades\HTML',
            'Input'       => 'Illuminate\Support\Facades\Input',
            'Lang'        => 'Illuminate\Support\Facades\Lang',
            'Log'         => 'Illuminate\Support\Facades\Log',
            'Mail'        => 'Illuminate\Support\Facades\Mail',
            'Paginator'   => 'Illuminate\Support\Facades\Paginator',
            'Password'    => 'Illuminate\Support\Facades\Password',
            'Queue'       => 'Illuminate\Support\Facades\Queue',
            'Redirect'    => 'Illuminate\Support\Facades\Redirect',
            'Redis'       => 'Illuminate\Support\Facades\Redis',
            'Request'     => 'Illuminate\Support\Facades\Request',
            'Response'    => 'Illuminate\Support\Facades\Response',
            'Route'       => 'Illuminate\Support\Facades\Route',
            'Schema'      => 'Illuminate\Support\Facades\Schema',
            'Seeder'      => 'Illuminate\Database\Seeder',
            'Session'     => 'Illuminate\Support\Facades\Session',
            'Str'         => 'Illuminate\Support\Str',
            'URL'         => 'Illuminate\Support\Facades\URL',
            'Validator'   => 'Illuminate\Support\Facades\Validator',
            'View'        => 'Illuminate\Support\Facades\View',
            'SSH'         => 'Illuminate\Support\Facades\SSH',
    
            // 3rd party
            'Sluggable' => 'Cviebrock\EloquentSluggable\Facades\Sluggable',
            'Profiler' => 'Profiler\Facades\Profiler',
        ),
    
    );

4. Create `app/config/local/database.php` to store your local db configuration, values below are valid if you plan to use the included vagrant. (recommended)

    ```PHP
<?php
return array(
    'connections' => array(
        'mysql' => array(
            'driver'    => 'mysql',
            'host'      => 'localhost',
            'database'  => 'dev',
            'username'  => 'root',
            'password'  => 'vagrant',
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => '',
        )
    )
);
  1. OPTIONAL: Create app/config/local/mail.php if you want to use the Python SMTP Debugger, and then run the following command in the console python -m smtpd -n -c DebuggingServer localhost:1025

    <?php
    return array(
        'driver' => 'smtp',
        'host' => 'localhost',
        'port' => 1025,
    );
  2. Run composer install to install dependencies php composer.phar update --dev or composer update --dev

  3. cd path/to/your/install and type vagrant up

  4. Once your vagrant is up, ssh to your VM using vagrant ssh

  5. cd to your web directory cd /vagrant

  6. Migrate the database php artisan migrate --env="local"

  7. Seed the database php artisan db:seed --env="local"

  8. Access your local install at http://127.0.0.1:8080

Clone this wiki locally