/** * Run the migrations. * * @return void */ public function up() { \Schema::table('inventories', function (Blueprint $table) { $table->text('public_key')->nullable(); $table->text('private_key')->nullable(); }); // generates keys for all inventories foreach (\App\Model\Inventory::all() as $inv) { $inv->save(); } }
public function index() { $stocks = Inventory::all(); return view('dream.stock.inventory', ['stocks' => $stocks]); }