【Controller】
use Carbon\Carbon;
public function create()
{
// 追加
$min=Carbon::now()->addMonthsWithOverflow(1)->firstOfMonth()->toDateString();
$max=Carbon::now()->addMonthsWithOverflow(2)->endOfMonth()->toDateString();
if(auth()->user()->role == 'admin') {
return redirect()->route('yoyaku.index', compact('min', 'max'));
}else {
return view('yoyaku.create', compact('min', 'max'));
}
【create.bladephp】
input type=dateの中に下記を加える
<input type="date" name="date1" id="date1" placeholder="Enter Title" min="{{$min}}" max="{{$max}}">