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 | |
/** | |
* Author : Ahmed Mohamed Abd El Ftah | |
* | |
* Twitter : @amaelftah | |
* | |
* Github: https://github.com/amaelftah | |
*/ |
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 | |
use App\Services\ShareService; | |
class Post extends Model | |
{ | |
public function share(ShareService $shareService) | |
{ | |
$shareService->shareOnFacebook($this); | |
} |
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 | |
if ( | |
$employee['age'] < '40' | |
&& $employee['medical_health'] == 'healthy' | |
&& $employee ['work_happits'] != 'bad' | |
) | |
{ | |
// do somethings |
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 | |
function isBlacklisted($name) | |
{ | |
if ($name == 'ahmed' || $name == 'mohamed' || $name == 'ali' || $name == 'khaled' || $name == 'ayman') | |
{ | |
return true; | |
} | |
return false; |