Laravel Eloquent ORM relation with pivot table

Table sample user id – integer name – string user-role user_id – integer role_id – integer role id – integer title – string   class User extends Model { /** * The roles that belong to the user. */ public…

Git repo setup for first time

Git global setup git config –global user.name “Raihan Chowdhury” git config –global user.email “mr.chowdhury@blmanagedservices.com” Create a new repository git clone https://gitlab.com/mr.chowdhury/test-repo.git cd test-repo touch README.md git add README.md git commit -m “add README” git push -u origin master Push an…

VsCode essential plugins and settings

Essential plugins Emmet Live ->Yurii Semeniuk Duplicate selection or line Spacegray Vscode   Additional vscode plugins Here are my: 1. Laravel Extension Pack (installs the following extensions) – Laravel Blade Snippets – Laravel 5 Snippets – Laravel Artisan – Laravel…

Sublime text essential plugins and settings

Sublime text essential plugins and settings Essential plugins  Emmet Space gray WordHighlight SortTabs DocBlockr Alignment All Autocomplete A File Icon   Add keyboard shortcut for SortTabs  -> Preference > Key Bindings [ { “keys”: [“f5”], “command”: “sort_tabs_menu” }, ]  …

Complex queries using Eloquent Query in Laravel

Using Eloquent Queries are easy and helpful  but what will you do when you need to do  a complex query like “select fields from table  where (a=1 OR b=1)AND (c=1 OR d=1);” You can make use of the parameter grouping…

PHP Job Requirements 2019

Position: Senior Software Engineer(PHP) Salary Range: 100k-120k What You’ll Work On: Cutting edge technology SaaS solution hosted on AWS that enables today’s and tomorrow’s Gig economy. Frontend built with React and Redux. Backend built on PHP, MySQL and increasingly NodeJS…

Install Multiple PHP Version with Apache on Ubuntu 18.04 (Part -2)

To Install mysql follow below tutorial INSTALLING NGINX, PHP, MYSQL (LEMP) STACK ON UBUNTU 18.04 – PART -2    Install Phpmyadmin(for database) sudo apt-get install phpmyadmin Manually Installing phpMyAdmin (Ubuntu 18.04) Posted on Jan 17, 2019 in Tutorials Sometimes installing phpMyAdmin…

Install Multiple PHP Version with Apache on Ubuntu 18.04 (Part -1)

Apache Installation Install Apache web server from the official repository. Launch terminal on your system or login with ssh for remote systems. Execute the following commands to install the latest available version of Apache web server. sudo apt update sudo…

More About EPEL and REMI Repository on CentOS/RedHat 7/6

EPEL is known as “Extra Packages for Enterprise Linux” repository having lots of extra packages which is not added in official repositories. REMI is a third party repository provides latest version of packages which is already included in official repositories…

Add User to the Wheel Group in CentOS

Give a user sudo access to run sudo command. Add User to the Wheel Group in CentOS The wheel group is a special user group that allows all members in the group to run all commands. Therefore, you need to…

CentOS 7 Change php version from one to another

Well, after this problem I’ve stuck in a few days, then today I found the question. First thing remove php71 from system, yum remove php-common php-cli mod-php enable remi-php70 yum-config-manager –enable remi-php70 after that disabled the 7.1 yum-config-manager –disable remi-php71…

Install Apache, PHP and MySQL (LAMP) on CentOS 7

Prerequsitis The two most popular rpm repositories REMI and EPEL have most of the updated packages. They are also providing the latest packages for LAMP setup. Enable both repositories on your system using the following commands on your CentOS 7…

Fix wordpress nginx permalink 404 error

Fix wordpress details page 404 page not found error on nginx server Change below code try_files $uri $uri/ =404; to try_files $uri $uri/ /wp-default/index.php?$args;   Here is the below working code location /wp-default {   # root /usr/share/;   root…

Installing Nginx, PHP, MySQL (LEMP) Stack on Ubuntu 18.04 – Part -1 (Extended)

Configure nginx Virtual Hosting and the PHP ProcessorPermalink In this guide, the domain example.com is used as an example site. Substitute your own FQDN or IP in the configuration steps that follow. Nginx uses server directives to specify name-based virtual hosts. Nginx calls these server…