public function deleteByRange($from, $to)
    {
        DB::beginTransaction();
        try {
            $from = $from . ' 00:00:00';
            $to   = $to . ' 23:59:59';
            $logs = Logs::whereBetween('created_at', [$from, $to]);
            $logs->delete();
        } catch (Exception $ex) {
            Log::alert($ex);
            DB::rollback();
            return false;
        }
        DB::commit();
        return true;
    }
public function deleteByRange($from, $to)
    {
        DB::beginTransaction();
        try {
            $from = $from . ' 00:00:00';
            $to   = $to . ' 23:59:59';
            $logs = Logs::whereBetween('created_at', [$from, $to]);
            $logs->delete();
        } catch (Exception $ex) {
            Log::alert($ex);
            DB::rollback();
            return false;
        }
        DB::commit();
        return true;
    }
public function deleteByRange ( $ from , $ to ) { DB :: beginTransaction ( ) ; try { $ from = $ from . ' 00:00:00' ; $ to = $ to . ' 23:59:59' ; $ logs = Logs :: whereBetween ( 'created_at' , [ $ from , $ to ] ) ; $ logs -> delete ( ) ; } catch ( Exception $ ex ) { Log :: alert ( $ ex ) ; DB :: rollback ( ) ; return false ; } DB :: commit ( ) ; return true ; }
Deletes logs using range

@param String $from
@param String $to
@return boolean
Deletes logs using range