Skip to content

Instantly share code, notes, and snippets.

View madhusudhan1234's full-sized avatar

Madhu Sudhan Subedi madhusudhan1234

View GitHub Profile
<!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>
import React, { Component } from 'react';
export default class DataTable extends Component {
constructor(props) {
super(props);
this.state = {
entities: {
data: [],
meta: {
<List
itemLayout="vertical"
size="large"
pagination={{
onChange: (page) => {
console.log(page);
},
pageSize: 3,
}}
dataSource={this.state.episodes}
server {
listen 80;
listen [::]:80;
server_name example.dev;
root /var/www/example/public;
index index.php index.html index.htm;
location / {
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:{
<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>
@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">
<!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>
<?php
namespace App\Http\Controllers;
/**
* Class UserController
* @package App\Http\Controllers
*/
class UserController extends Controller
{
<?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use App\User;
/**
* Class UserApiController
* @package App\Http\Controllers\API
*/