Skip to content

Instantly share code, notes, and snippets.

View chebaby's full-sized avatar
🏠
Working from home

Nour-Eddine ECH-CHEBABY chebaby

🏠
Working from home
View GitHub Profile
@socheatsok78
socheatsok78 / README.md
Last active March 29, 2019 03:18
PWA with Laravel Mix, Webpack and Service Worker caching strategies
@ethanstenis
ethanstenis / Postman POST PUT Requests.txt
Last active September 13, 2023 01:11
How to make Postman work with POST/PUT requests in Laravel...
To make Postman work with POST/PUT requests...
https://laravel.com/docs/5.2/routing#csrf-x-csrf-token
In addition to checking for the CSRF token as a POST parameter, the Laravel VerifyCsrfToken middleware will also check for the X-CSRF-TOKEN request header.
1. Store the token in a "meta" tag at the top of your root view file (layouts/app.blade.php)...
<meta name="csrf-token" content="{{ csrf_token() }}">
** If using jQuery, you can now instruct it to include the token in all request headers.
$.ajaxSetup({
@ericelliott
ericelliott / defaults-overrides.md
Last active May 7, 2023 13:52
ES6 defaults / overrides pattern

ES6 Defaults / Overrides Pattern

Combine default parameters and destructuring for a compact version of the defaults / overrides pattern.

function foo ({
    bar = 'no',
    baz = 'works!'
  } = {}) {
@meganlkm
meganlkm / laravel_shared_hosting_project.sh
Last active May 19, 2019 23:14
setup a laravel 4.2 project to deploy to a shared hosting provider
#!/bin/bash
myproject='myproject'
mywwwdir='public_html'
# initialize project
composer create-project laravel/laravel $myproject 4.2.*
cd $myproject
perl -pi -e "s|/public|/../${mywwwdir}|" bootstrap/paths.php
@captbaritone
captbaritone / mail.php
Last active February 22, 2018 23:08
This is the mail configuration I use on Laravel to get it to send email to [MailCatcher](http://mailcatcher.me/)
<?php
return array(
// Send it mail via SMTP
'driver' => 'smtp',
// Whatever port you have MailCatcher's SMTP server running on (they suggest 1025)
'port' => 1025,
@digitaljhelms
digitaljhelms / gist:4287848
Last active April 26, 2024 10:44
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@kevinSuttle
kevinSuttle / meta-tags.md
Last active March 31, 2024 14:26 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags