Skip to content

Instantly share code, notes, and snippets.

@Faisalawanisee
Forked from hofmannsven/README.md
Created September 22, 2015 18:29
Show Gist options
  • Save Faisalawanisee/2aacd2aa534326fa155d to your computer and use it in GitHub Desktop.
Save Faisalawanisee/2aacd2aa534326fa155d to your computer and use it in GitHub Desktop.
Notes on working with Laravel CLI

Working with Laravel

» http://laravel.com/

Cheatsheet: http://cheats.jesse-obrien.ca/

PhpStorm Helper: https://github.com/laravelbook/laravel4-phpstorm-helper

Usage

Show version: php artisan --version

Show all commands: php artisan list

Live: php artisan up

Maintenance: php artisan down

Run: php artisan serve

Setup

Install: http://laravel.com/docs/quick#installation

Install Mcrypt via Homebrew (MAMP + localhost only): brew install mcrypt + link in .bash_profile

Key: php artisan key:generate

Setup Permissions

See: http://stackoverflow.com/a/24369509/1815847

Setup with Angular

Follow https://scotch.io/quick-tips/quick-tip-using-laravel-blade-with-angularjs

Migration

Make table: php artisan migrate:make create_users_table --table=users » see app/database/migrations

Migrate: php artisan migrate

Migrate, again: php artisan migrate:refresh

Composer

Clear autoload: composer dump-autoload

Database

Populate: php artisan db:seed

Working with October CMS

» https://github.com/octobercms/october

Developer guide: https://octobercms.com/docs/help/console

Commands

Run: php artisan october:up

Clear cache: php artisan cache:clear

Debugging: No backend no styling in the frontend after installation

Themes

Themes: https://octobercms.com/themes

Install: php artisan theme:install theme-author.theme-name theme-dir

Activate: php artisan theme:use theme-dir

Plugins

Plugins: https://octobercms.com/plugins

Install & activate: php artisan plugin:install plugin-author.plugin-name

Working with Laravel/Blade

Comment: {{-- Hello World! --}}

Include: @include('modules.header')

Styles: {{ HTML::style('css/vendor/normalize.css') }}

Scripts: {{ HTML::script('js/vendor/jquery.min.js') }}

Blade::setContentTags('<%', '%>'); // for variables and all things Blade
Blade::setEscapedContentTags('<%%', '%%>'); // for escaped data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment