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
// Single line comment | |
/* Multi- | |
line comment */ | |
// A package clause starts every source file. | |
// Main is a special name declaring an executable rather than a library. | |
package main | |
// Import declaration declares library packages referenced in this file. | |
import ( |
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
//Try Using | |
@include('pagination.default', ['paginator' => $value]) | |
//Use this way in your file to view | |
@if ($paginator->lastPage() > 1) | |
<ul class="pagination"> | |
<li class="{{ ($paginator->currentPage() == 1) ? ' disabled' : '' }}"> | |
<a href="{{ $paginator->url(1) }}">Previous</a> | |
</li> | |
@for ($i = 1; $i <= $paginator->lastPage(); $i++) |
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
$customer = Customer::where(function($query) use ($param) { | |
$query->where('full_name', 'iLIKE', '%'.$param['keyword'].'%') | |
->orWhere('mobile', 'iLIKE', '%'.$param['keyword'].'%') | |
->orWhere('phone', 'iLIKE', '%'.$param['keyword'].'%'); | |
})->where('published','1') | |
->where('customer_status','N') | |
->orderBy('full_name', 'ASC')->get(); |
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
Bash [Bourne Again Shell] | |
Bourne Means Boundary | |
It is named so, because it supports user interaction and again a user can only interact with the script if it will wait for user. | |
Bash supports two modes | |
1. Interactive Mode(waits for user command, if required) &, | |
2. Non-Interactive Mode | |
File Descriptors are basically used to give instructions from outer world, e.g keyboards | |
There are basically three types of file descriptors:- |
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
#!/usr/bin/env bash | |
echo "Written By Ankur Mishra" | |
echo "Starting Server Setup....." | |
echo "Be Sure you are are a super user..." | |
# To become a super user | |
sudo su | |
# to update the packages from repositories | |
apt-get update |
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
#!/usr/bin/env bash | |
echo "Written By Ankur Mishra" | |
echo "Starting Server Setup....." | |
echo "Be Sure you are are a super user..." | |
# To become a super user | |
# to update the packages from repositories | |
apt-get update |
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
#!/usr/bin/env bash | |
echo "Written By Ankur Mishra" | |
echo "Starting Server Setup....." | |
echo "Be Sure you are are a super user..." | |
# To become a super user | |
sudo su -i | |
# to update the packages from repositories | |
apt-get update |