Created
May 3, 2015 17:17
-
-
Save serefyarar/32bc92f0902ed7dbe9a3 to your computer and use it in GitHub Desktop.
Çalışması lazım
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$films = Film::with('roles','genre'); | |
$title = Input::get('title',false); | |
if($title){ | |
$films->where('title',$title); | |
} | |
$genre = Input::get('genre',false); | |
if($genre){ | |
$films->where('genre',function($query) use($genre){ | |
$query->where('genreIdentifier',$genre); | |
}); | |
} | |
$films->get(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
genreIdentifier neyse artık : )