Latest Bhajans
@php
$blog= App\Models\blog::join('categories','categories.id', '=' , 'blogs.blog_category')->select('blogs.*','categories.*','blogs.created_at as blogcreete')->where('blogs.status','1')->where('blog_slug','!=',$data->blog_slug)->latest('blogs.id')->take(12)->get();
@endphp
@foreach($blog as $list)
@if($list->count() > 0)
@else
Noting
@endif
@endforeach
Categories
@php
$category= App\Models\category::take(10)->get();
@endphp
@foreach($category as $categorys)
@if($categorys->count() > 0)
@else
Noting
@endif
@endforeach
You May Also Like
@php
$cate = App\Models\category::where('id',$data->blog_category)->first();
$blog= App\Models\blog::join('categories','categories.id', '=' , 'blogs.blog_category')->select('blogs.*','categories.*','blogs.created_at as blogcreete')->where('blogs.status','1')->where('blog_category',$cate->id)->where('blog_slug','!=',$data->blog_slug)->latest('blogs.id')->take(20)->get();
@endphp
@foreach($blog as $list)
@if($list->count() > 0)
@else
Noting
@endif
@endforeach