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
############################################################################### | |
## The Master .htaccess | |
## | |
## Version 2.5 (proposed) - May 16th, 2011 | |
## | |
## ---------- | |
## This file is designed to be the template .htaccess file to put on your new | |
## sites, increasing your site's security and performance. It is not meant to | |
## be just dropped in your site, though. You should go through all of its | |
## sections and modify it to match your site. Most notably, all instances of |
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 | |
namespace App\Traits; | |
use App\User; | |
use DateTime; | |
use GuzzleHttp\Psr7\Response; | |
use Illuminate\Events\Dispatcher; | |
use Laravel\Passport\Bridge\AccessToken; | |
use Laravel\Passport\Bridge\AccessTokenRepository; |
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
.select2 { | |
border-color:1px solid #cacaca; | |
box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1); | |
background-color:#fefefe; | |
} | |
.select2-dropdown, .select2-container--default .select2-selection--single , | |
.select2-container--default .select2-selection--multiple, .select2-container--default .select2-selection--multiple .select2-selection__choice, | |
.select2-container--classic .select2-selection--multiple , .select2-container--classic .select2-selection--multiple, | |
.select2-container--classic .select2-selection--multiple .select2-selection__choice, .select2-dropdown, |
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
1. upload all files to /home/user/public_html | |
2. edit /var/cpanel/userdata/$username/$domain.com | |
3. change the document root path from public_html to public_html/public | |
4. /scripts/rebuildhttpdconf | |
Done! |
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
// Step 1. Create this class in the middleware folder. | |
<?php namespace App\Http\Middleware; | |
use Closure; | |
class BeforeAutoTrimmer { | |
/** | |
* Handle an incoming request. |
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
1) Show lines when opening files. Add the -C flag | |
``` nano -C file.txt ``` | |
2) Go to line. | |
``` CTRL+SHIFT+_ ``` | |
3) Select block of text |
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
Example | |
@foreach ($invoice->items->load(['product'=> function($q){$q->withTrashed();}]) as $item){ | |
// do stuff | |
} |
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
$countries = array('AF' => 'Afghanistan', 'AX' => 'Aland Islands', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AS' => 'American Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AI' => 'Anguilla', 'AQ' => 'Antarctica', 'AG' => 'Antigua And Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Austria', 'AZ' => 'Azerbaijan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgium', 'BZ' => 'Belize', 'BJ' => 'Benin', 'BM' => 'Bermuda', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnia And Herzegovina', 'BW' => 'Botswana', 'BV' => 'Bouvet Island', 'BR' => 'Brazil', 'IO' => 'British Indian Ocean Territory', 'BN' => 'Brunei Darussalam', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'KH' => 'Cambodia', 'CM' => 'Cameroon', 'CA' => 'Canada', 'CV' => 'Cape Verde', 'KY' => 'Cayman Islands', 'CF' => 'Central African Republic', 'TD' => 'Chad', 'CL' => 'Chile', 'CN' => 'China', 'CX' => 'Christmas Island', 'CC' |
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 | |
namespace App\Billit\Traits; | |
trait Postmarkable | |
{ | |
/** | |
* @param array $tags | |
*/ | |
public function setTag(array $tag): void |
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
cd /usr/share/ | |
sudo mv phpmyadmin/ phpmyadmin-4.8.5/ | |
sudo wget https://files.phpmyadmin.net/phpMyAdmin/4.8.5/phpMyAdmin-4.8.5-all-languages.zip | |
sudo unzip phpMyAdmin-4.8.5-all-languages.zip | |
sudo ln -s phpMyAdmin-4.8.5-all-languages phpmyadmin | |
sudo chown -R www-data:www-data /usr/share/phpmyadmin | |
sudo chmod -R 755 /usr/share/phpmyadmin | |
sudo service apache2 restart |
NewerOlder