Skip to content

Instantly share code, notes, and snippets.

@serefyarar
Created May 3, 2015 17:17
Show Gist options
  • Save serefyarar/32bc92f0902ed7dbe9a3 to your computer and use it in GitHub Desktop.
Save serefyarar/32bc92f0902ed7dbe9a3 to your computer and use it in GitHub Desktop.
Çalışması lazım
<?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();
@serefyarar
Copy link
Author

genreIdentifier neyse artık : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment