Lavarel 快速學習自我挑戰 Day21
升級到 Laravel 5.3 Part II 升級 users 把 AdminUsersController 的 lists 全部改為 pluck 升級 posts 新增到 routes/web.php Route::get('/post/{id}', ['as'=>'home.post', 'uses'=>'AdminPostsController@p
升級到 Laravel 5.3 Part II 升級 users 把 AdminUsersController 的 lists 全部改為 pluck 升級 posts 新增到 routes/web.php Route::get('/post/{id}', ['as'=>'home.post', 'uses'=>'AdminPostsController@p
Pretty URL eloquent-sluggable 套件說明書 require 套件 composer require cviebrock/eloquent-sluggable 4.1 在 config/app.php 新增 provider Cviebrock\EloquentSluggable\ServiceProvider::class, 在 Post model 新增 12
Application 留言功能 Part II 顯示留言 在 admin/posts/index view 新增文章連結 <td><a href="{{" {{route('home.post', $post->id)" }}}}">view post</a&g
Application 留言功能 Part I 設定環境 新增 views/admin/comments/index.blade.php 和 views/admin/comments/replies/index.blade.php 新增 routes 12Route::resource('admin/comments', 'PostCommentsContro
Application Media 設定和顯示 新增 view views/media/index.blade.php 設定 media index view 12345678910111213141516171819202122232425262728293031323334@extends('layouts.admin')@section('content
Application Post Part II 對貼文分類新增 model 和 migration 新增 model php artisan make:model Category -m 在 category 的 model 處理 mass assignment protected $fillable = ['name']; 在 create_categories_table 新增欄位 $
Application Post Part I 設定 routes 設定 404 page view 1234567@extends('layouts.app')@section('content') <h1 class="text-center">Opps no page available</h1>
Application 2 上傳功能 新增 enctype ('type'=>true) {!! Form::open(['method'=>'POST', 'action'=>'AdminUsersController@store', 'files'=>true]) !!} 新增 migration php artisan make:migrat
Application 基礎設定 開新的專案 composer create-project --prefer-dist laravel/laravel codehacking 5.2.29 新增資料庫、設定環境變數、進行 migration php artisan migrate 設定 views 新增登入介面 php artisan make:auth 在 view 將目錄權限分開
Sessions - Sessions 設定官方文件 Setting and Reading Sessions 加到 HomeController 1234$request->session()->put(['edwin'=>'master instructor']);// session(['peter
Form Login - Authentication 設定官方文件 安裝新的 Laravel composer create-project --prefer-dist laravel/laravel login 5.2.29 設定 vhost Database 連線和 migration 建立資料庫、設定 .env 直接 migrate php artisan migrate 建立
Model Manipulation Dates 搜尋套件 composer search carbon 引用套件 use Carbon\Carbon; 新增 routes 12345678910111213141516171819Route::get('/dates', function(){ $date = new DateTime('+1