Comments (3)
Alejandri, you can see the changes suggested by idangozlan. Check the only pull request that's active.
from laravel-5-bootstrap-3-starter-site.
Thanks. I solved changed in HomeController this:
public function index()
{
$news = $this->news->orderBy('position', 'DESC')->orderBy('created_at', 'DESC')->limit(4)->get();
$sliders = Photo::join('photo_album', 'photo_album.id','=','photo.photo_album_id')
->where('photo.slider',1)
->orderBy('photo.position', 'DESC')
->orderBy('photo.created_at', 'DESC')
->select('photo.filename','photo.name','photo.description','photo_album.folderid')->get();
$photoalbums = PhotoAlbum::select(array('photo_album.id', 'photo_album.name', 'photo_album.description',
'photo_album.folderid',
DB::raw('(select filename from photo WHERE album_cover=1 and photo.photo_album_id=photo_album.id) AS album_image'),
DB::raw('(select filename from photo WHERE photo.photo_album_id=photo_album.id ORDER BY position ASC, id ASC LIMIT 1) AS album_image_first')))->limit(8)->get();
$videoalbums = VideoAlbum::select(array('video_album.id', 'video_album.name', 'video_album.description',
'video_album.folderid',
DB::raw('(select youtube from video as v WHERE album_cover=1 and v.video_album_id=video_album.id) AS album_image'),
DB::raw('(select youtube from video WHERE video.video_album_id=video_album.id ORDER BY position ASC, id ASC LIMIT 1) AS album_image_first')))->limit(8)->get();
return view('site.home.index',compact('news','sliders','videoalbums','photoalbums'));
}
from laravel-5-bootstrap-3-starter-site.
TNX for help! 👍
from laravel-5-bootstrap-3-starter-site.
Related Issues (20)
- ErrorException in Factory.php line 564: Cannot end a section without first starting one. (View: C:\xampp\htdocs\s5\resources\views\pages\home.blade.php) HOT 4
- How to use it with Laravel 5.2 ? HOT 2
- Not ableto upload the image HOT 2
- after registration, it'll not send mail for confirmation HOT 1
- I got this after following all steps , any help please? HOT 3
- JQuery not defined HOT 3
- new crud HOT 7
- Not able to upload the photos in articles HOT 5
- text editor is not appearing
- want to change the redirection of user
- Method [validateRequired,unique] does not exist. HOT 1
- 34 Character app key generated
- No supported encrypter found. The cipher and / or key length are invalid.
- $ is not defined js error on admin site and pages are not rendered properly. any fix? HOT 1
- No Modals? HOT 5
- We should update this to laravel 5.4 HOT 1
- multiple file upload HOT 1
- Admin Style broken :( HOT 5
- Missing CSS Classes (like "form-control")
- NotFoundHttpException in RouteCollection.php line 161:
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-5-bootstrap-3-starter-site.