Skip to content

Instantly share code, notes, and snippets.

View MayorScript's full-sized avatar

Joseph Ayobami MayorScript

View GitHub Profile
@MayorScript
MayorScript / gist:3577d54a64d93b41febdba2ea43c5103
Created May 24, 2021 22:01 — forked from harrisonde/gist:90431ed357cc93e12b51
Deploy Laravel 5 applications on AWS Elastic Beanstalk
# The following script will deploy a Laravel 5 applicaion on AWS Elastic Beanstalk.
# Add to .ebextensions at the root of your application and name your commands file (e.g., commands.config)
# -------------------------------- Commands ------------------------------------
# Use "commands" key to execute commands on the EC2 instance. The commands are
# processed in alphabetical order by name, and they run before the application
# and web server are set up and the application version file is extracted.
# ------------------------------------------------------------------------------
commands:
01updateComposer:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Model\Admin\Product;
use App\Model\Admin\Category;
use Auth;
use Session;
use Image;
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCategoriesTable extends Migration
{
/**
* Run the migrations.