Skip to content

Instantly share code, notes, and snippets.

View flavioribeirojr's full-sized avatar
:shipit:
debugging...

Flávio Ribeiro flavioribeirojr

:shipit:
debugging...
View GitHub Profile
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFabricantesTable extends Migration
{
/**
* Run the migrations.
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCarrosTable extends Migration
{
/**
* Run the migrations.
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { HttpClientModule } from '@angular/common/http';
import { CarrosService } from './carros/carros.service';
import { AppComponent } from './app.component';
import { CarrosComponent } from './carros/carros.component';
@NgModule({
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { CarrosComponent } from './carros/carros.component';
import { NotFoundComponent } from './not-found/not-found.component';
const routes = [
{path: '', redirectTo: 'carros', pathMatch: 'full'},
{path: 'carros', component: CarrosComponent},
{path: '**', component: NotFoundComponent}
];
import { Component, OnInit } from '@angular/core';
import { CarrosService } from './carros.service';
@Component({
selector: 'carros',
templateUrl: './carros.component.html',
styleUrls: ['./carros.component.css']
})
export class CarrosComponent implements OnInit {
export class Fabricante {
constructor(
id: number,
nome: string
) {}
}
import { Fabricante } from './fabricante';
export class Carro {
constructor(
public id: number,
public modelo: string,
public fabricante: Fabricante,
public ano: Date,
@flavioribeirojr
flavioribeirojr / scripts
Last active January 12, 2018 14:26
Useful commands
git log --follow outro_branch -- <arquivo>
@flavioribeirojr
flavioribeirojr / App.js
Last active October 30, 2018 12:01
Fluxo de componentes pai > filho
import React, { Component } from 'react'
class Filho extends Component {
render() {
const onClick = this.props.onClick
return (
<div>
<button onClick={() => onClick()}>
Click me!
</button>