Skip to content

Instantly share code, notes, and snippets.

Building for the next billion users...

Stephen Jude stephenjude

Building for the next billion users...
Block or report user

Report or block stephenjude

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
stephenjude / namecheap
Created Oct 7, 2018 — forked from Shourai/namecheap
Letsencrypt SSL certificate with namecheap hosting
View namecheap


The “Positive SSL” certificate I bought along with my domain is invalid with any of my subdomains and cannot be used with wildcards. One annoying thing is that namecheap doesn’t offer auto installation of free let’s encrypt certificates, even though, they are saying “Namecheap is dedicated to data security and privacy for all internet users. We believe the movement to encrypt nearly all web traffic is a positive direction. As more sites embrace HTTPS and use of security products, providers of free SSL are beginning to come online.”

Let me show you what it needs to be done in order to “encrypt nearly all web traffic”.

First, not required but it’s helpful to enable ssh access, it is not enabled by default on the base hosting plans, just go an start a live chat and request ssh access.

View ProductTransformer.php
namespace App\Transformers;
use App\Product;
use League\Fractal;
class ProductTransformer extends Fractal\TransformerAbstract
public function transform(Product $product)
View ProductsController.php
namespace App\Http\Controllers;
use App\Product;
use Illuminate\Http\Request;
use League\Fractal;
use League\Fractal\Manager;
use League\Fractal\Resource\Item;
use League\Fractal\Resource\Collection;
View web.php
$app->get('/', function () use ($app) {
return $app->version();
//product routes
$app->get('products', 'ProductsController@index');
$app->get('products/{id}', 'ProductsController@show');
$app->put('products/{id}', 'ProductsController@update');
View DatabaseSeeder.php
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
* Run the database seeds.
* @return void
View Product.php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Product extends Model
View ModelFactory.php
$factory->define(App\Product::class, function (Faker\Generator $faker) {
return [
'product_name' => $faker->word,
'product_description' => $faker->text,
View create_products_table.php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateProductsTable extends Migration
* Run the migrations.
View .env
View ProductTest.php
class ProductTest extends TestCase
* /products [GET]
public function testShouldReturnAllProducts(){
$this->get("products", []);
You can’t perform that action at this time.