laravel 模型绑定
摘要:namespace App\Providers;class RouteServiceProvider extends ServiceProvider{ public function boot(Router $router) { parent::boot($router);...
阅读全文
laravel blog 二
摘要:修改数据库articles结构,添加到user表的外键,migrate:refresh public function up() { Schema::create('articles', function (Blueprint $table) { $t...
阅读全文
laravel blog 一
摘要:路由Route::resource('articles','ArticleController');modelclass Article extends Model{ //添加可填充的字段 protected $fillable = [ 'title', 'body', ...
阅读全文
laravel sendmail
摘要:配置.envMAIL_DRIVER=smtpMAIL_HOST=smtp.163.comMAIL_PORT=25MAIL_USERNAME=myMail@163.comMAIL_PASSWORD=******MAIL_ENCRYPTION=null设置 config/mail.php'from' =...
阅读全文
laravel controller
摘要:倒序取出 public function index() { $as = Article::latest('published_at')->get(); return view('a.index',compact('as')); }
阅读全文
laravel 登录验证
摘要:1. 修改ROUTE// Authentication routes...Route::get('login', 'Auth\AuthController@getLogin');Route::post('login', 'Auth\AuthController@postLogin');Route::...
阅读全文
laravel route
摘要:Route::get('/', function () { return view('welcome');});Route::resource('a', 'ArticleController');Route::controller([ 'auth' => 'Auth\AuthContro...
阅读全文
laravel form
摘要:1. Composer 安装composer require illuminate/html需要php-xml扩展支持2. 添加 providers修改 config/app.php 文件, 在 providers 数组里面添加:'Illuminate\Html\HtmlServiceProvide...
阅读全文
laravel 5.1 学习
摘要:下载composerhttps://getcomposer.org/download/修改镜像来源composer config -g repositories.packagist composer http://packagist.phpcomposer.com在wwwroot下创建项目compo...
阅读全文