Skip to content

Instantly share code, notes, and snippets.

View almokhtarbr's full-sized avatar
👋

almokhtar almokhtarbr

👋
  • 22:45 (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 / Artisan.php
Created May 24, 2018 19:16
Laravel Cheat Sheet
php artisan --help OR -h
php artisan --quiet OR -q
php artisan --version OR -V
php artisan --no-interaction OR -n
php artisan --ansi
php artisan --no-ansi
php artisan --env
// -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
php artisan --verbose
@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()
psd to html :
1. font / font size of h1-h2-h3 and the weigh : bold - italic
2. colors : primary color / secondary color
3. exporting images != better you can search for svg for better page loading
4. bootstrap - font awsome - google font - my css.css - respond .js
5. ta9sim dyal code by psd file : header / body / footer / hero …
6. start css : body{aslaskl}/h1{sd}
7. 9asem css / slider / portofolio /
8. responsive in same css file and 9asem
@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()
{