Skip to content

Instantly share code, notes, and snippets.


fokosun fokosun

Block or report user

Report or block fokosun

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
fokosun / bWAPP easy setup
Last active Dec 19, 2018
setup bWAPP without WAMP or XAMPP or any Virtual machine
View bWAPP easy setup
Important Note: PHP Version must be < version 5.5 if you are using version 7.0
you will need to use a VM like bee-box so you can have an isolated installation of PHP5.4 installed
Download and install bee-box:
Download bWAPP:
Unzip the downloaded zipped folder
fokosun / index.php
Created Oct 25, 2018 — forked from mchelen/index.php
php check multidimensional array for duplicate values
View index.php
$arrays = array(
fokosun / StatusRepository.php
Created May 19, 2018 — forked from laracasts/StatusRepository.php
Integration Testing Repositories That Use Eloquent (with Codeception)
View StatusRepository.php
<?php namespace Larabook\Statuses;
use Larabook\Users\User;
class StatusRepository {
* Get all statuses associated with a user.
* @param User $user
View User.php
namespace App;
use Illuminate\Auth\Authenticatable;
use Laravel\Lumen\Auth\Authorizable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
class User extends Model implements AuthenticatableContract, AuthorizableContract
use Authenticatable, Authorizable;
View create_users_table.php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
* Run the migrations.
* @return void
View web.php
| Application Routes
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
View UserController.php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
use Illuminate\Hashing\BcryptHasher;
* Class UserController
fokosun / palindrome.php
Last active Aug 5, 2017
Stack Data structure
View palindrome.php
$letters = [];
$word = "racecar";
$rword = "";
for($i=0; $i<strlen($word); $i++) {
array_push($letters, $word[$i]);
for($i=0; $i<strlen($word); $i++) {
$rword = $rword . array_pop($letters);
fokosun / tymon-jwt-lumen5.4
Created Jul 24, 2017
How to install and configure tymon-jwt on Lumen5.4
View tymon-jwt-lumen5.4
pull in the package using composer
$ composer require tymon/jwt-auth:"^1.0@dev"
next run composer update
$ composer update
open AppServiceProvder and add the following code into the register method
View tricks.gist
you accidentally committed .idea and all it's gabbage, fix things by runnig the following on your terminal:
git rm --cached -r .idea
But first make sure add .idea to your .gitignore file like so:
commit then push!
You can’t perform that action at this time.