Skip to content

Instantly share code, notes, and snippets.

@fouedmoussi
fouedmoussi / README-Template.md
Created May 2, 2020 10:38 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@fouedmoussi
fouedmoussi / countries.json
Created April 11, 2020 10:16
Countries with Slugs, Dialing Codes, Unicodes Flags, Wikipedia Flags Urls in JSON format
{
"countries":
[
{
"value": 1155,
"label": "Afghanistan",
"slug": "afghanistan",
"code": "004",
"dial_code": "+93",
"flag_unicode": "🇦🇫",
@fouedmoussi
fouedmoussi / PHP Arabic Slugs
Created February 19, 2020 13:13
Creating a slug from Arabic letters
<?php
$stringParts = array_values(array_filter(explode(" ", 'مقالة جديدة')));
$slug = '';
foreach ($stringParts as $key => $string) {
$hyphen = ($key < sizeof($stringParts) - 1) ? '-' : '';
$slug .= $string . $hyphen;
}
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class GenerateView extends Command
{
/**
* The name and signature of the console command.