/** * Run the migrations. * * @return void */ public function up() { Schema::create('manifests', function (Blueprint $table) { $table->increments('id'); $table->integer('version'); $table->timestamps(); }); \App\Manifest::create(['version' => 0]); }
public function updateManifest() { //Get last version of manifest $manifest = Manifest::GetVersions()->first(); $vers = $manifest->version; //version ++ $vers++; $img_uploads = Controller::getImages('uploads'); $this->UpdateManfiest($vers, $img_uploads); Manifest::where('id', 1)->update(['version' => $vers]); }