Skip to content

Commit 84a17df

Browse files
committed
migrate
1 parent 2ea76ff commit 84a17df

File tree

18 files changed

+61483
-8
lines changed

18 files changed

+61483
-8
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
namespace App\Http\Controllers;
4+
5+
use Illuminate\Http\Request;
6+
7+
class HomeController extends Controller
8+
{
9+
/**
10+
* Create a new controller instance.
11+
*
12+
* @return void
13+
*/
14+
public function __construct()
15+
{
16+
$this->middleware('auth');
17+
}
18+
19+
/**
20+
* Show the application dashboard.
21+
*
22+
* @return \Illuminate\Contracts\Support\Renderable
23+
*/
24+
public function index()
25+
{
26+
return view('home');
27+
}
28+
}

app/Student.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace App;
4+
5+
use Illuminate\Database\Eloquent\Model;
6+
7+
class Student extends Model
8+
{
9+
//
10+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class CreateStudentsTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('students', function (Blueprint $table) {
17+
$table->bigIncrements('id');
18+
$table->string('name');
19+
$table->string('email');
20+
$table->string('phone');
21+
$table->timestamps();
22+
});
23+
}
24+
25+
/**
26+
* Reverse the migrations.
27+
*
28+
* @return void
29+
*/
30+
public function down()
31+
{
32+
Schema::dropIfExists('students');
33+
}
34+
}

package-lock.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"resolve-url-loader": "^2.3.1",
2121
"sass": "^1.15.2",
2222
"sass-loader": "^7.1.0",
23-
"vue": "^2.5.17"
23+
"vue": "^2.5.17",
24+
"vue-template-compiler": "^2.6.12"
2425
}
2526
}

public/css/app.css

Lines changed: 10942 additions & 6 deletions
Large diffs are not rendered by default.

public/js/app.js

Lines changed: 49966 additions & 1 deletion
Large diffs are not rendered by default.

public/mix-manifest.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"/js/app.js": "/js/app.js",
3+
"/css/app.css": "/css/app.css"
4+
}

public/note

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
data = state
2+
vueX = redux
3+
vue router = router
4+
5+
+ roor element: require
6+
7+
+ 2 ways binding:
8+
+bind du lieu 2 chieu
9+
10+
+ phu thuoc vao kieu cua element
11+
12+
+lifrcycle: vong doi cua component trong vue
13+
14+
+ binding:
15+
+ value binding: {{ }}
16+
property binding:
17+
v-bind:[tenthuoctinh]="dgrere" (id, class, style,...)
18+
+ viet tat (co the viet :[tenthuoctinh] khong can v-bind)
19+
20+
+model: lien ket element voi property
21+
22+
+event handing:
23+
+bat su kien tu cac element
24+
+v-on:[ten su kien]="sgtregre"
25+
viet tat: v-on:click -> @click
26+
+Prevent default event:
27+
+ huy bo event mac dinh cua element di -> lamf tiep cai gi do theo y thich
28+
29+
+ ref:
30+
Anh xa den chinh element
31+
32+
+Conditional rendering:
33+
+ v-show: an/hien 1 element theo dieu kien
34+
+ v-hide
35+
+ v-if
36+
+ v-else-if
37+
+v-el (else)
38+
39+
+list rendering:
40+
+v-for
41+
42+
+methods:
43+
+function cua vue object
44+
45+
+watch
46+
Thao doi su thay doi cua data
47+
48+
+hood:
49+
mounted
50+
51+
Props:
52+
Dua du lieu day tu component cha sang component con
53+
Cach khai bao:
54+
+dung mang ten cac prop
55+
+dungf object
56+
57+
Props =data
58+
59+
Event:
60+
61+
filter:
62+
bien doi du lieu truoc khi no dc render
63+
64+
https://stackoverflow.com/questions/149055/how-to-format-numbers-as-currency-string
65+
https://www.youtube.com/watch?v=j97QtHf0CHY&t=882s
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<template>
2+
<div class="container">
3+
<div class="row justify-content-center">
4+
<div class="col-md-8">
5+
<div class="card">
6+
<div class="card-header">Example Component</div>
7+
8+
<div class="card-body">
9+
I'm an example component.
10+
</div>
11+
</div>
12+
</div>
13+
</div>
14+
</div>
15+
</template>
16+
17+
<script>
18+
export default {
19+
mounted() {
20+
console.log('Component mounted.')
21+
}
22+
}
23+
</script>

0 commit comments

Comments
 (0)