Update Guide
Update id 3af71ba
Note: If you are installing the script for the first time you don't need to apply this update.
Important: We are not going to update your application, ever time a new update is released. You have to update it yourself own. So keep the backup copy always.
What's New
- [Added] Comments section in admin panel
- [Added] Deleted Category feature
- [Added] Drag and drop category re-order in admin panel
- [Bug Fix] Some minor reported issues are fixed.
- [Bug Fix] User delete bug fix
- [Framework] Framework updates
- [Improvement] Category improvement
- [Improvement] Translation update
- [Optimization] Reduced number of SQL executed
- [Security] Minor security update
Actual List of files modified in this update
- app/artvenue/repository/ImagesRepository.php
- app/controllers/admin/blogs/BlogsController.php
- app/controllers/admin/blukupload/BulkuploadController.php
- app/controllers/admin/comments/CommentController.php
- app/controllers/admin/images/ImageController.php
- app/controllers/admin/images/UpdateController.php
- app/controllers/admin/sitesettings/UpdateController.php
- app/controllers/admin/users/UpdateController.php
- app/controllers/CategoryController.php
- app/controllers/ImageController.php
- app/controllers/UploadController.php
- app/database/migrations/2013_09_09_122201_create_users_table.php
- app/database/migrations/2013_09_09_122550_create_image_table.php
- app/database/migrations/2013_09_14_090452_create_categories_table.php
- app/database/migrations/2013_09_14_090452_create_sitecategories_table.php
- app/database/migrations/2014_04_24_165259_create_categories_table.php
- app/database/seeds/DatabaseSeeder.php
- app/lang/en/text.php
- app/library/functions.php
- app/library/installer/DBSeedSettings.php
- app/library/sitesettings.php
- app/models/Category.php
- app/models/Images.php
- app/models/Sitecategories.php
- app/models/User.php
- app/routes.php
- app/views/admin/blogs/blogs.blade.php
- app/views/admin/bulkupload/index.blade.php
- app/views/admin/comments/comments.blade.php
- app/views/admin/comments/edit.blade.php
- app/views/admin/images/edit.blade.php
- app/views/admin/master.blade.php
- app/views/admin/sitedetails/index.blade.php
- app/views/admin/sitesettings/category.blade.php
- app/views/admin/sitesettings/limit.blade.php
- app/views/gallery/index.blade.php
- app/views/image/edit.blade.php
- app/views/image/sidebar.blade.php
- app/views/login/index.blade.php
- app/views/master/footer.blade.php
- app/views/master/navbar.blade.php
- app/views/settings/index.blade.php
- app/views/upload/index.blade.php
- app/views/user/index.blade.php
- app/views/user/rightsidebar.blade.php
- app/views/user/users.blade.php
- public/static/admin/js/jquery-ui.min.js
- public/static/admin/js/sortable.js
- public/static/css/bootstrap.css
- public/static/css/bootstrap.min.css
How to update
Before update make sure to create backup of both files and database ( ! Important )
This update require some database changes to create backup of database
- Delete
vendor
directory replace it with new one from Main.zip
- Either replace files from above list one by one or replace these folders from main.zip
app/artvenue
app/controllers
app/views
app/models
app/database
app/library
app/lang
app/routes.php
app/filters.php
public/static
- Open app/routes.php place the below code in it.
Route::get('update', function () {
if (Schema::hasTable('categories')) {
return 'Already Updated';
}
Artisan::call('migrate');
DB::table('categories')->insert(array(
array('name' => 'Uncategorized', 'slug' => 'uncategorized')
));
Schema::table('users', function ($table) {
$table->string('remember_token')->nullable()->after('email_favorite');
});
Schema::table('images', function ($table) {
$table->integer('category_id')->default(1)->unsigned()->after('image_description');
});
$category = DB::table('sitecategories')->get();
foreach ($category as $cat) {
$newcategory = new Category;
$newcategory->name = $cat->category;
$newcategory->slug = $cat->slug;
$newcategory->save();
$images = Images::where('category', '=', $cat->slug)->get();
foreach ($images as $image) {
$image->category_id = $newcategory->id;
$image->save();
}
}
Schema::drop('sitecategories');
Schema::table('images', function ($table) {
$table->dropColumn('category');
});
File::cleanDirectory(app_path() . '/storage/cache');
File::cleanDirectory(app_path() . '/storage/views');
return 'Success';
});
- Visit yoursite.com/update you will see a success message.
- Remove the above placed code.
Some tips
- Create back
- Try at localhost first
- Create a private git repo. to track changes.
- Turn on the debug mode to track the error.