Skip to content

Instantly share code, notes, and snippets.

View madhusudhan1234's full-sized avatar

Madhu Sudhan Subedi madhusudhan1234

View GitHub Profile
<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>
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:{
server {
listen 80;
listen [::]:80;
server_name example.dev;
root /var/www/example/public;
index index.php index.html index.htm;
location / {
<List
itemLayout="vertical"
size="large"
pagination={{
onChange: (page) => {
console.log(page);
},
pageSize: 3,
}}
dataSource={this.state.episodes}
import React, { Component } from 'react';
export default class DataTable extends Component {
constructor(props) {
super(props);
this.state = {
entities: {
data: [],
meta: {
<!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>
<?php
namespace App\Http\Controllers;
use App\Http\Resources\UsersResource;
use App\User;
use Illuminate\Http\Request;
/**
* Class UsersController
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('address');
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
return [
'id' => $this->id,
'name' => $this->name,
'email' => $this->email,
'address' => $this->address,
'created_at' => Carbon::parse($this->created_at)->toDayDateTimeString(),
];
$factory->define(App\User::class, function (Faker $faker) {
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'email_verified_at' => now(),
'address' => $faker->address,
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
'remember_token' => str_random(10),
];
});