Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DB::statement(DB::raw('SET @rownum = 0'));
- $tops = DB::table('articles')
- ->select(DB::raw('id','head','description', '@rownum := @rownum + 1 as rownum'))
- ->where('approve', '=', 'Aprobado')
- ->where('important','Destacado')
- ->orderBy('id', 'DESC')
- ->paginate(5);
- <div id="tops0" class="card" style="border:none !important; margin: 0;">
- <a href="{{ route('show',$top->id.$top->head) }}">
- <img class="card-img-top" src="../images/{{$top->path}}" alt="Card image cap" style="height: 112px">
- </a>
- <a href="{{ route('show',$top->id.$top->head) }}" class="a-corregido2">
- <span id="">{{$top->rownum}}</span><span class="title-tops">{{ $top ->head }}</span>
- </a>
- </div>
- @endforeach
Add Comment
Please, Sign In to add comment