Laravel step (new to me)

Source: Internet
Author: User

Laravel step (new to me)

1/A virtual server like wnmp is required

 

2/create a route php artisan make: route routes

 

Route: group (['ddleware '=> ['web', 'admin. login '], 'prefix' => 'admin', 'namespace' => 'admin'], function (){

// Route loading welcome page 1
Route: get ('index', 'indexcontroller @ Index ');

}

3/create the controller php artisan make: controller Indexcontroller

 

Public function index (

// Return to the page

Return view ('admin Index ');

)

 

4/create a module in the background: php artisan make: model Categorymodel

 

Class Category extends Model

{
Protected $ table = 'category ';
Protected $ primaryKey = 'cate _ id ';
Public $ timestamps = false;
Protected $ guarded = []; // This change is used when the laravel framework has a fill protection measure
}

5. You can use Navicat Premium to create php Data.

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.