Skip to content

Instantly share code, notes, and snippets.

@sineld sineld/routes.php
Created Oct 27, 2013

Embed
What would you like to do?
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
You can’t perform that action at this time.