Skip to content

Instantly share code, notes, and snippets.

View earth774's full-sized avatar
🐷
Wannueng

เอิร์ท earth774

🐷
Wannueng
View GitHub Profile
@earth774
earth774 / DatabaseSeeder.php
Created April 28, 2019 08:11
Create fake data user
<?php
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
@earth774
earth774 / ModelFactory.php
Created April 28, 2019 07:54
Fake Data Factory
<?php
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding your
| database. Just tell the factory how a default model should look.
@earth774
earth774 / Users.php
Created April 28, 2019 06:55
Model Users
<?php
namespace App;
use Illuminate\Auth\Authenticatable;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Database\Eloquent\Model;
use Laravel\Lumen\Auth\Authorizable;
@earth774
earth774 / create_user_table.php
Created April 27, 2019 07:45
create insert database
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
@earth774
earth774 / create_user_table
Created April 27, 2019 07:13
create table in database
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
@earth774
earth774 / HelloWorld.vue
Created April 21, 2019 05:39
add function Login Facebook
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<button @click="socialGoogleLogin">Google</button>
<button @click="socialFacecbookLogin">Facebook</button>
</div>
</template>
<script>
@earth774
earth774 / HelloWorld.vue
Created April 11, 2019 10:07
did login google
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<button @click="socialGoogleLogin">Google</button>
<button>Facebook</button>
</div>
</template>
<script>
@earth774
earth774 / HelloWorld.vue
Created April 10, 2019 09:54
Code page HelloWorld.vue
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<button>Google</button>
<button>Facebook</button>
</div>
</template>
<script>
@earth774
earth774 / index.html
Created March 18, 2019 12:57
slot component
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Amiearth</title>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
@earth774
earth774 / index.html
Last active March 18, 2019 12:36
component single element
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Amiearth</title>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>