<?php namespace App\Http\Controllers;
use App\Profile; // Profile Model
use Auth; // Auth model
use Request;
use Response;
use Storage;
use App\Actions;

class DayController extends Controller {

	/*
	|--------------------------------------------------------------------------
	| Day Controller (Cron Controller)
	|--------------------------------------------------------------------------
	|
	|
	*/

	/**
	 * Download controller instance.
	 *
	 * @return void
	 */
	public function __construct()
	{
		//$this->middleware('guest');
	}

	/**
	 * Downloading public files.
	 *
	 * @return Response
	 */

	public function ShareFiveDaysExpire()
	{
		$result = Actions::where('created_at','<=',date('Y-m-d',strtotime('-5days')))->where('status','=','1')->update(['status'=>'0']);
		echo $result;
	}
}
