Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dukeann/larasimple
laravel框架核心精简版composer 搭建
https://github.com/dukeann/larasimple
laravel mvc mvc-application mvc-framework php php7
Last synced: 10 days ago
JSON representation
laravel框架核心精简版composer 搭建
- Host: GitHub
- URL: https://github.com/dukeann/larasimple
- Owner: DukeAnn
- Created: 2017-07-19T03:31:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-26T01:18:42.000Z (over 2 years ago)
- Last Synced: 2024-10-13T14:32:13.959Z (25 days ago)
- Topics: laravel, mvc, mvc-application, mvc-framework, php, php7
- Language: PHP
- Size: 27.3 KB
- Stars: 6
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# larasimple
## laravel框架核心精简版composer 搭建
composer直接拉取laravel核心MVC结构
```json
"require": {
"php": ">=5.6.4",
"illuminate/routing": "^5.5",
"illuminate/events": "^5.5",
"illuminate/database": "^5.5",
"illuminate/view": "^5.5"
},
"autoload": {
"psr-4": {
"App\\": "app/"
}
}
```### 数据库配置
`larasimple/config/database.php````php
"mysql",
'host' => "localhost",
'database' => "laratest",
'username' => "root",
'password' => "root",
'charset' => "utf8",
'collation' => 'utf8_general_ci',
'prefix' => ''
];
```### 路由文件
`app/Http/routes.php`
## 使用方法
创建一个名为laratest的数据库
执行以下sql创建测试数据库
```sql
/*
Navicat MySQL Data TransferSource Server : localhost
Source Server Version : 50717
Source Host : localhost:3306
Source Database : laratestTarget Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001Date: 2017-07-19 11:56:41
*/SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for students
-- ----------------------------
DROP TABLE IF EXISTS `students`;
CREATE TABLE `students` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`age` int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;-- ----------------------------
-- Records of students
-- ----------------------------
INSERT INTO `students` VALUES ('1', 'wshuo', '21');```