Skip to content

Instantly share code, notes, and snippets.

@sineld
Created October 27, 2013 12:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sineld/7181518 to your computer and use it in GitHub Desktop.
Save sineld/7181518 to your computer and use it in GitHub Desktop.
Sefa için filtre örneği
<?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