Skip to content

Instantly share code, notes, and snippets.

View almokhtarbr's full-sized avatar
👋

almokhtar almokhtarbr

👋
  • 20:37 (UTC -04:00)
View GitHub Profile
#!/bin/bash
#Download the latest copy of WordPress into a directory, grab all the files in the new /wordpress folder
#Put all the files in the current directory, remove the now empty /wordpress directory
#Remove the tarball
#download latest wordpress with wget
wget http://wordpress.org/latest.tar.gz
#OR using CURL
in migration users add :
$table->string('user_type',50);
in Authserviceprovider :
use Gate as GateContract;
public function boot(GateContract $gate){
....->($gate);
}
$gate->define('isAdmin',function($user){return $user->user_type == 'admin';}
@almokhtarbr
almokhtarbr / BlogController.php
Created June 29, 2018 19:34 — forked from tobysteward/BlogController.php
Laravel AJAX Pagination with JQuery
<?php
class BlogController extends Controller
{
/**
* Posts
*
* @return void
*/
public function showPosts()
@almokhtarbr
almokhtarbr / webdev_online_resources.md
Created July 18, 2018 17:59 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
in fresh installation of composer and you face " valet command not found "
type this line and you will see the magic hahahha :
test -d ~/.composer && bash ~/.composer/vendor/bin/valet install || bash ~/.config/composer/vendor/bin/valet install
// create_categories_table
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('categories', function (Blueprint $table) {
// create_categories_table
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
filters : {
currency(value){
var formatter = Intl.NumberFormat('en-US',
{
style:'currency',
currency:'USD',
minimumFractionDigits : 0
});
return formatter.format(value);