Laravel 5.3 Form Implementation Curd Quick Start tutorial

Source: Internet
Author: User
Tags add time laravel migration

First, Introduction:

A Laravel 5.3 form implementation Curd Quick Start tutorial (Demo)

Code Download: Https://github.com/yanlongma/laravel-curd

Second, installation:

1. Connecting to the database

Modify the. env configuration file

Db_connection=mysql
Db_host=localhost
db_port=3306
Db_database=laravel
Db_username=root
Db_password=root
2. New data table

First create a database laravel, and then create a datasheet.

2.1. Create a datasheet using laravel migration

PHP Artisan Migrate
2.2 Manually execute the following SQL create data table

DROP TABLE IF EXISTS students;

CREATE TABLE IF not EXISTS students (

' id ' INT auto_increment PRIMARY KEY,
' Name ' VARCHAR (255) Not NULL DEFAULT ' COMMENT ' name ',
' Age ' TINYINT UNSIGNED not NULL DEFAULT 0 COMMENT ' ages ',
' Sex ' TINYINT UNSIGNED not NULL DEFAULT COMMENT ' sex ',/* 10 unknown 20 Male 30 Female * *

' Created_at ' INT not NULL DEFAULT 0 COMMENT ' Add time ',
' Updated_at ' INT not NULL DEFAULT 0 COMMENT ' modify time '

) Engine=innodb DEFAULT charset=utf8 comment= ' student table ';
3. Visit

Open the browser, enter your project address, please confirm your address before visiting, as follows:

http://localhost:8888/laravel-curd/public/index.php
If the following page appears, the installation is successful, you can start Laravel learning journey!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.