Skip to content

Instantly share code, notes, and snippets.

View insign's full-sized avatar
🇧🇷
being open-sourcerer

Hélio insign

🇧🇷
being open-sourcerer
View GitHub Profile
@insign
insign / app\routes.php
Created September 17, 2013 06:46
Resource bug
<?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 Closure to execute when that URI is requested.
<?php
class ItemsController extends BaseController {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index() {
@insign
insign / 2014_10_29_181650_create_users_fotos_table.php
Created November 23, 2015 16:34
Problemas com relacionamentos - laravel (Error: Call to undefined method Illuminate\Database\Query\Builder::mini())
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUsersFotosTable extends Migration
{
/**
* Run the migrations.
@insign
insign / User.php
Created November 23, 2015 16:32
Problemas com relacionamentos - laravel
<?php
// APENAS A PARTE RELEVANTE
public function fotos()
{
return $this->hasMany('\App\UserFoto');
}
?>