Update Guide

Release 1.2

What’s New

How to Update

app
config
database
packages
public/assets
public/images
public/packages
public/vendor
resources/lang/en
resources/lang/es
resources/lang/fr
resources/views
vendor
.env.example
artisan
composer.json
package.json
readme.md
server.php
public/.htaccess
public/robots.txt
Route::get('update', function () {
    if (!Schema::hasColumn('ads', 'reviewed')) {
        Schema::table('ads', function ($table) {
            $table->boolean('reviewed')->nullable()->default(0)->index('reviewed')->after('active');
        });
        if (Schema::hasColumn('ads', 'reviewed')) {
            $affected = \DB::table('ads')->update(array('reviewed' => 1));
        }
    }
    $updateSqlFile = database_path('sql/data/updates/from-1.1-to-1.2/update.sql');
    if (file_exists($updateSqlFile)) {
        \DB::table('settings')->where('key', '=', 'ads_review_activation')->delete();
        \DB::table('settings')->where('key', '=', 'facebook_page_fans')->delete();
        \DB::unprepared(file_get_contents($updateSqlFile));
    }
    return 'Success';
});

NOTE: You are free to delete the folders and files below, which are development files (if exists):