This file contains 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
<!doctype html> | |
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="csrf-token" content="{{ csrf_token() }}"> | |
<title>Laravel</title> | |
<link rel="stylesheet" href="{{ asset('css/app.css') }}"/> | |
</head> | |
<body> |
This file contains 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'; | |
export default class DataTable extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
entities: { | |
data: [], | |
meta: { |
This file contains 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
<List | |
itemLayout="vertical" | |
size="large" | |
pagination={{ | |
onChange: (page) => { | |
console.log(page); | |
}, | |
pageSize: 3, | |
}} | |
dataSource={this.state.episodes} |
This file contains 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
server { | |
listen 80; | |
listen [::]:80; | |
server_name example.dev; | |
root /var/www/example/public; | |
index index.php index.html index.htm; | |
location / { |
This file contains 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
window.Event = new Vue(); | |
Vue.component('post', { | |
template: '#post-template', | |
props: ['title', 'author', 'content'], | |
created(){ | |
let vm0 = new Vue(); | |
Event.$on('alertData',this.alertData); | |
}, | |
methods:{ |
This file contains 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
<div id="app"> | |
<button @click="alertData('Hello')">Click Me</button> | |
<post :title="title" :author="author" :content="content"></post> | |
</div> | |
<template id="post-template"> | |
<h1>{{ title }}</h1> | |
<h4>{{ author }}</h4> | |
<p>{{ content }}</p> | |
<small>Data From component {{ component }}</small> |
This file contains 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
@extends('layouts.app') | |
@section('content') | |
<div class="container"> | |
<table class="table table-bordered"> | |
<tr> | |
<th>Name</th> | |
<th>Email</th> | |
<th>Created At</th> | |
</tr> | |
<tr v-for="user in users.data"> |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="csrf-token" content="{{ csrf_token() }}"> | |
<title>{{ config('app.name', 'Laravel') }}</title> | |
<link href="/css/app.css" rel="stylesheet"> | |
</head> |
This file contains 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 | |
namespace App\Http\Controllers; | |
/** | |
* Class UserController | |
* @package App\Http\Controllers | |
*/ | |
class UserController extends Controller | |
{ |
This file contains 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 | |
namespace App\Http\Controllers\API; | |
use App\Http\Controllers\Controller; | |
use App\User; | |
/** | |
* Class UserApiController | |
* @package App\Http\Controllers\API | |
*/ |