Created
October 27, 2013 12:48
-
-
Save sineld/7181518 to your computer and use it in GitHub Desktop.
Sefa için filtre örneği
This file contains hidden or 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 | |
class DogumgunuFilter { | |
public function filter($route, $request, $tarih) { | |
if (date('d/m') == $tarih) { | |
return 'Doğum günün kutlu olsun Sefa'; | |
} | |
} | |
} | |
Route::filter('dogumgunu', 'DogumgunuFilter'); | |
Route::get('sefa', array( | |
'before' => 'dogumgunu:27/10', | |
function() | |
{ | |
return 'selam'; | |
} | |
)); | |
/* | |
Tarih 27/10 ise ekrana | |
"Doğum günün kutlu olsun Sefa" | |
basacak, değilse | |
"selam" | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment