This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Illuminate\Support\Facades\Schema; | |
| use Illuminate\Database\Schema\Blueprint; | |
| use Illuminate\Database\Migrations\Migration; | |
| class CreateFabricantesTable extends Migration | |
| { | |
| /** | |
| * Run the migrations. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Illuminate\Support\Facades\Schema; | |
| use Illuminate\Database\Schema\Blueprint; | |
| use Illuminate\Database\Migrations\Migration; | |
| class CreateCarrosTable extends Migration | |
| { | |
| /** | |
| * Run the migrations. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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} | |
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class Fabricante { | |
| constructor( | |
| id: number, | |
| nome: string | |
| ) {} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Fabricante } from './fabricante'; | |
| export class Carro { | |
| constructor( | |
| public id: number, | |
| public modelo: string, | |
| public fabricante: Fabricante, | |
| public ano: Date, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git log --follow outro_branch -- <arquivo> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react' | |
| class Filho extends Component { | |
| render() { | |
| const onClick = this.props.onClick | |
| return ( | |
| <div> | |
| <button onClick={() => onClick()}> | |
| Click me! | |
| </button> |
OlderNewer