Thursday, September 15, 2016

A Simple CRUD using Laravel 5.2 Framework

Steps to Install the Application to a Remote Server
  1. Decompress and upload all files to target directory gregorytest.rar.
  2. Import the database gregorydata.sql
  3. Copy all files inside /public folder into the default project folder.
  4. Remove folder /public.
  5. Edit file ./index.php, add this line
    use Illuminate\Contracts\Http\Kernel; to the topmost line.
    On the same file, look for line
    require __DIR__.'/../bootstrap/autoload.php';
    and replace it with
    require __DIR__."/bootstrap/autoload.php";
    Also, line
    $app = require_once __DIR__.'/../bootstrap/app.php';
    with
    $app = require_once __DIR__."/bootstrap/app.php";
    Lastly line $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
    with
    $kernel = $app->make(Kernel::class);
  6. Edit file /config/bootstrap.php and locate line 'url' => env('APP_URL', 'http://localhost'), and replace it with 'url' => env('APP_URL', 'http://[you_project_folder]/'),
  7. Finally, .env file needs editing also
    APP_ENV=local
    APP_DEBUG=true
    APP_KEY=base64:eegf6eODvThzJiyXWMp3Bh7OLUbgqOJhQ16kZcXr9qw=
    APP_URL=http://[project_directory]
    DB_CONNECTION=mysql
    DB_HOST=sql6.freemysqlhosting.net
    DB_PORT=3306
    DB_DATABASE=sql6135311
    DB_USERNAME=sql6135311
    DB_PASSWORD=3te5D9vhTU
  8. Enjoy!

No comments:

Post a Comment