<?php
namespace AppHttpControllers;
use IlluminateHttpRequest;
use CarbonCarbon;
class DateController extends Controller
{
public function index()
{
$currentDateTime = Carbon::now();
$newDateTime = Carbon::now()->addMonth();
print_r($currentDateTime);
print_r($newDateTime);
}
}
<?php
namespace AppHttpControllers;
use IlluminateHttpRequest;
use CarbonCarbon;
class DateController extends Controller
{
public function index()
{
$currentDateTime = Carbon::now();
$newDateTime = Carbon::now()->addDay();
print_r($currentDateTime);
print_r($newDateTime);
}
}
public function myMonthApts()
{
return $this->appointments()
->whereIn('status_id', [3,4])
->whereYear('created_at', Carbon::now()->year)
->whereMonth('created_at', Carbon::now()->month)
->count();
}
<?php
namespace AppHttpControllers;
use IlluminateHttpRequest;
use CarbonCarbon;
class DateController extends Controller
{
public function index()
{
$currentDateTime = Carbon::now();
$newDateTime = Carbon::now()->addYear();
print_r($currentDateTime);
print_r($newDateTime);
}
}
<?php
namespace AppHttpControllers;
use IlluminateHttpRequest;
use CarbonCarbon;
class SignaturePadController extends Controller
{
/**
* Write code on Method
*
* @return response()
*/
public function index()
{
$currentDateTime = Carbon::now();
$newDateTime = Carbon::now()->addMonth();
print_r($currentDateTime);
print_r($newDateTime);
}
}
use CarbonCarbon;