Benutzer-Werkzeuge

Webseiten-Werkzeuge


Seitenleiste

3D

INTERN

ADOBE

ARDUINO

BITBUCKET

DOCKER

C4D

GIT

HTML

IPHONE

JAVASCRIPT

JTL-SHOP

LARAVEL

MAGENTO2

MYSQL

PHP

PLESK

PROCESSING

PYTHON

SUITECRM

SEO

TRYTON

THUNDERBIRD / ICEDOVE / FossaMail

TYPO3

TYPO3: BACKEND

TYPO3: TYPOSCRIPT

UNIX

VLC

VVVV

WINDOWS

WINDOWS 10

WORDPRESS

XAMPP

XT:C 4 (Veyton)

laravel:cheatsheet

Laravel Cheatsheet / Reminders

laravel/framework 5.1

Migrations

start local server

$ php artisan serve

create migrations

$ php artisan migrate:make create_customers_table

migrations are in database/migrations e.g

<?php
 
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
 
class CreateCustomersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('customers', function (Blueprint $table) {
            $table->increments('id');
            $table->string('first_name');
            $table->string('last_name');
            $table->string('email')->unique();
            $table->timestamps();
        });
    }
 
    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('customers');
    }
}

and can then be migrated to database via

$ php artisan migrate

documentation

Models

create model

$ php artisan make:model Customer

model can be found in app/ Directory

Controller

IDE Helper

laravel-ide-helper

$ php artisan clear-compiled
$ php artisan ide-helper:generate
$ php artisan optimize
laravel/cheatsheet.txt · Zuletzt geändert: 2015/07/28 02:28 von admin