For the scenario, imagine posts has a foreign key user_id referencing users.id
public function up()
{
Schema::create('posts', function(Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->text('body');| <?php | |
| namespace Aluno\Model; | |
| use Zend\Db\TableGateway\TableGateway; | |
| use \Exception; | |
| // import for fetchPaginator | |
| use Zend\Db\Sql\Select, | |
| Zend\Db\ResultSet\HydratingResultSet, |
| <?php | |
| namespace Site\Controller; | |
| use Site\Form\Upload; | |
| use Zend\Mvc\Controller\AbstractActionController; | |
| use Zend\View\Model\ViewModel; | |
| class ArquivoController extends AbstractActionController | |
| { |
| <div class="col-sm-9 padding-right"> | |
| <div class="product-details"><!--product-details--> | |
| <div class="col-sm-5"> | |
| <div class="view-product"> | |
| <img src="http://commerce.dev:10088/uploads/10.jpg" alt=""/> | |
| package br.uesc.nilton.focoapi14; | |
| import android.Manifest; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.content.pm.PackageManager; | |
| import android.graphics.Bitmap; | |
| import android.location.Location; | |
| import android.location.LocationListener; | |
| import android.location.LocationManager; |
| <?php | |
| class Teste { | |
| public function __construct() | |
| { | |
| echo "Executando o construtor pai\n"; | |
| } | |
| public function meuMetodo() | |
| { |
| <?php | |
| define('CLASS_DIR', __DIR__ . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR); | |
| set_include_path(get_include_path().PATH_SEPARATOR.CLASS_DIR); | |
| spl_autoload_register(); |
| <?php | |
| namespace DeliveryUrbano\Http\Requests; | |
| use Illuminate\Http\Request as HttpRequest; | |
| class CheckoutRequest extends Request { | |
| /** | |
| * Determine if the user is authorized to make this request. |
| <?php | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Application Routes | |
| |-------------------------------------------------------------------------- | |
| | | |
| | Here is where you can register all of the routes for an application. | |
| | It's a breeze. Simply tell Laravel the URIs it should respond to | |
| | and give it the controller to call when that URI is requested. |
| <?php | |
| namespace DeliveryUrbano\Http\Controllers\Api\Client; | |
| use \DeliveryUrbano\Http\Controllers\Controller; | |
| use DeliveryUrbano\Http\Requests\CheckoutRequest; | |
| use DeliveryUrbano\Repositories\OrderRepository; | |
| use DeliveryUrbano\Repositories\UserRepository; | |
| use DeliveryUrbano\Services\OrderService; | |
| use \LucaDegasperi\OAuth2Server\Facades\Authorizer; |
For the scenario, imagine posts has a foreign key user_id referencing users.id
public function up()
{
Schema::create('posts', function(Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->text('body');