@if(!empty($project))
@php
$count = count($project);
$row = 1;
$row_photo = 1;
$col = 6;
@endphp
@foreach($project as $p)
@if(!empty($p['url']))
@php
if($count == 2){
if($row == 1 && $row_photo <= 2){
$col = 6;
}else if($row == 2 && $row_photo == 1){
$col = 4;
}else if($row == 2 && $row_photo == 2){
$col = 4;
}else if($row == 2 && $row_photo == 3){
$col = 4;
}else if($row == 3){
$col = 6;
}
}else if($count > 2){
if($row == 1 && $row_photo <= 2){
$col = 6;
}else if($row == 2 && $row_photo == 1){
$col = 4;
}else if($row == 2 && $row_photo == 2){
$col = 4;
}else if($row == 2 && $row_photo == 3){
$col = 4;
}else if($row == 3){
$col = 12;
}
}else if($count == 1){
if($row == 1 && $row_photo == 1){
$col = 12;
}else if($row == 1 && $row_photo == 2){
$col = 6;
}else if($row == 2 && $row_photo == 1){
$col = 12;
}else if($row == 2 && $row_photo == 2){
$col = 4;
}else if($row == 2 && $row_photo == 3){
$col = 4;
}else if($row == 3 && $row_photo == 2){
$col = 6;
}else if($row == 3){
$col = 12;
}
}
@endphp
@endif
@endforeach
@endif