This Github link will give you all the Geo location information of Bangladesh with longitude and latitude and gov websites for each district.Click for getting GitHub link
Sunday, October 21, 2018
Thursday, October 18, 2018
CakePhp Eluquent Subquery Example
public function beforeSave(Event $event, Entity $entity){
}
public function initialize(array $config)
{
$this->addBehavior('Timestamp'); //gestion des colonnes created et modified
$this->hasMany('ForumPosts');
$this->hasOne('LastForumPost', [
'className' => 'ForumPosts',
'foreignKey' => false,
'conditions' => function ($exp, $query) {
$subquery = $query
->getConnection()
->newQuery()
->select(['SubLastForumPost.id'])
->from(['SubLastForumPost' => 'forum_posts'])
->where([
'SubLastForumPost.draft = false', //to remove for admin
'SubLastForumPost.created IS NOT NULL',
'ForumCategories.id = SubLastForumPost.forum_category_id',
'SubLastForumPost.parent_id IS NULL'])
->order(['SubLastForumPost.created' => 'DESC'])
->limit(1);
return $exp->add(['LastForumPost.id' => $subquery]);
}
]);
}From cakephp forum
Wednesday, October 3, 2018
Subscribe to:
Posts (Atom)
-
https://www.nicesnippets.com/blog/laravel-9-comment-system-example-tutorial
-
Laravel Queues allow you to delay a time-consuming task until a later time. By delaying the time-consuming task, you can improve the perfo...
-
Organization : Keeping each site's configuration in separate files makes the server easier to manage, especially when hosting multiple...