public function run()
 {
     DB::table('user')->delete();
     DB::table('pages')->delete();
     Article::create(array('title' => 'First post', 'slug' => 'first-post', 'body' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', 'user_id' => 1));
     Page::create(array('title' => 'About us', 'slug' => 'about-us', 'body' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', 'user_id' => 1));
 }
 public function run()
 {
     DB::table('pages')->delete();
     for ($i = 0; $i < 10; $i++) {
         Page::create(['title' => 'Title ' . $i, 'slug' => 'first-page', 'body' => 'Body ' . $i, 'user_id' => 1]);
     }
 }
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function postStore(Request $request)
 {
     $this->validate($request, ['slug' => 'required|unique:pages']);
     // Uncomment and modify if you need to validate any input.
     Page::create($request->all());
     return redirect('/admin/pages');
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $examplePages = [['path' => '/', 'page_type' => 'basic', 'content' => 'This is the home page content', 'meta' => null], ['path' => 'about', 'page_type' => 'basic', 'content' => 'This is the about page content', 'meta' => null], ['path' => 'services', 'page_type' => 'basic', 'content' => 'This is the services page content', 'meta' => null], ['path' => 'services/marketing', 'page_type' => 'basic', 'content' => 'This is the services marketing page content', 'meta' => null], ['path' => 'services/production', 'page_type' => 'basic', 'content' => 'This is the services production page content', 'meta' => null], ['path' => 'industry/news', 'page_type' => 'articles', 'content' => 'This is the articles page content', 'meta' => ['content_before_list' => 'Content before list', 'content_after_list' => 'Content after list']], ['path' => 'contact-us', 'page_type' => 'contact', 'content' => 'This is the contact page content', 'meta' => null]];
     foreach ($examplePages as $pageData) {
         \App\Models\Page::create($pageData);
     }
 }
Пример #5
0
 public function pageNew(Page $pageModel = null, Request $request = null)
 {
     if (request()->isMethod('POST')) {
         $pageModel->create($request->all());
         return redirect()->route('admin.pages.static');
     } else {
         return view('admin.pages.create');
     }
 }
Пример #6
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(Request $request)
 {
     $formdata = $request->all();
     $validator = Validator::make($formdata, Page::$rules);
     if ($validator->fails()) {
         return Redirect::back()->withErrors($validator)->withInput();
     }
     // $formdata['user_id'] = Auth::user()->id;
     Page::create($formdata);
     return Redirect::route('pages.index');
 }
 public function run()
 {
     DB::table('articles')->truncate();
     // Using truncate function so all info will be cleared when re-seeding.
     DB::table('pages')->truncate();
     Article::create(array('title' => 'First post', 'slug' => 'first-post', 'body' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', 'user_id' => 1, 'created_at' => Carbon\Carbon::now()->subWeek(), 'updated_at' => Carbon\Carbon::now()->subWeek()));
     Article::create(array('title' => '2nd post', 'slug' => '2nd-post', 'body' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', 'user_id' => 1, 'created_at' => Carbon\Carbon::now()->subDay(), 'updated_at' => Carbon\Carbon::now()->subDay()));
     Article::create(array('title' => 'Third post', 'slug' => 'third-post', 'body' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', 'user_id' => 1));
     Page::create(array('title' => 'Welcome', 'slug' => 'welcome', 'body' => 'Welcome to the site', 'user_id' => 1));
     Page::create(array('title' => 'About us', 'slug' => 'about-us', 'body' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', 'user_id' => 1));
     Page::create(array('title' => 'Contact', 'slug' => 'contact', 'body' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', 'user_id' => 1));
 }
 public function run()
 {
     $faker = Faker::create('zh_CN');
     $adminUser = User::where('name', '=', 'admin')->first();
     $adminUserId = isset($adminUser) ? $adminUser->id : 0;
     $publicPath = app('path.public');
     $dirPath = $publicPath . '/uploads/images/fakers';
     $urlDirPath = '/uploads/images/fakers';
     DB::table('pages')->delete();
     foreach (range(1, 100) as $index) {
         Page::create(['title' => 'znyesmaxfine单页' . $index, 'thumb' => URL($urlDirPath . '/' . $faker->image($dirPath, 640, 480, null, false)), 'slug' => '', 'content' => $faker->text, 'user_id' => $adminUserId, 'created_at' => new DateTime(), 'updated_at' => new DateTime()]);
     }
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('pages', function (Blueprint $table) {
         $table->increments('id');
         $table->string('slug');
         $table->text('about')->nullable();
         $table->text('options')->nullable();
         $table->timestamps();
         $table->timestamp('published')->nullable();
         $table->softDeletes();
     });
     Page::create(['slug' => 'home', 'options' => Helpers::serialize(['active' => 'home', 'hero' => '1', 'jumbotron' => '/images/networking.jpg', 'upcoming' => '1', 'benefits' => '1', 'testimonials' => '1']), 'published' => Carbon::create(2015, 00, 28, 15, 05, 29)]);
     Page::create(['slug' => 'about', 'about' => '<p>Established in 2012, Acclaim Events was created to help Business Technology Executives find solutions to many of today’s critical business challenges. We were built on the premise that networking and the sharing of ideas among technology leaders will help broaden and expand IT knowledge within the local community. With over 20 years of combined experience, our Acclaim Events team knows what it takes to facilitate high quality, interactive and educational technology networking conferences.</p><p>IT Professionals are tasked with keeping corporate and private information secure, while embracing new ways of supporting and doing business. With technology advancing at an alarming rate, it can be challenging to keep up with many of the technological advances, trends and best practices that help to keep our organizations competitive and secure.</p><p>Our IT Strategies Conferences foster an exclusive environment for CIOs &amp; Sr. level IT Executives that is conducive to learning, networking and sharing ideas with their peers; giving them valuable insight and knowledge that they can use within their organizations.</p>', 'options' => Helpers::serialize(['active' => 'about', 'hero' => '0', 'title' => 'About Acclaim Events', 'about' => '1', 'team' => '1', 'advisors' => '1']), 'published' => Carbon::create(2015, 00, 28, 15, 05, 29)]);
     Page::create(['slug' => 'conferences', 'options' => Helpers::serialize(['active' => 'conferences', 'title' => 'Conferences', 'conferences' => '1']), 'published' => Carbon::create(2015, 00, 28, 15, 05, 29)]);
     Page::create(['slug' => 'conference', 'options' => Helpers::serialize(['active' => 'conferences', 'title' => 'event:conference', 'hero' => '1', 'jumbotron' => 'event:hero', 'countdown' => '0', 'about' => '0', 'agenda' => '0', 'speakers' => '0', 'sponsors' => '0', 'sponsorlevels' => '0', 'map' => '0', 'address' => '0', 'coords' => '0', 'venue' => '0']), 'published' => Carbon::create(2015, 00, 28, 15, 05, 29)]);
     Page::create(['slug' => 'contact', 'options' => Helpers::serialize(['active' => 'contact', 'title' => 'Contact Us', 'hero' => '0', 'jumbotron' => '/images/contact.jpg', 'contact' => '1']), 'published' => Carbon::create(2015, 00, 28, 15, 05, 29)]);
     Page::create(['slug' => 'register', 'options' => Helpers::serialize(['active' => 'register', 'title' => 'Conference Registration', 'hero' => '0', 'jumbotron' => '/images/registration.jpg', 'contact' => 'register']), 'published' => Carbon::create(2015, 00, 28, 15, 05, 29)]);
 }
Пример #10
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     File::cleanDirectory(storage_path() . '/app');
     // Logistics
     $logistics = Logistics::create(array('logistics_name' => 'Free Shipping', 'status' => 'enabled', 'logistics_desc' => 'Free Shipping', 'deliverer_name' => '\\App\\Plugins\\Offical\\Deliverers\\Simple', 'deliverer_settings' => array('effective' => '1-2 days', 'price' => 0), 'deliverer_cod' => array()));
     $payment = Payment::create(array('payment_name' => 'Paypal', 'status' => 'enabled', 'payment_desc' => 'Paypal', 'gateway_name' => '\\App\\Plugins\\Offical\\Payments\\Paypal\\Main', 'gateway_settings' => array('username' => 'garbinh-facilitator_api1.gmail.com', 'password' => '35RQL3NH8CN5JAFS', 'signature' => 'An5ns1Kso7MWUdW4ErQKJJJ4qi4-ASi8mA4dnxkI-AikSA9AZVvSERfE')));
     $models = $this->createProduct(['product_name' => 'Tesla Model S', 'status' => 'available', 'product_desc' => '', 'options' => array(['name' => 'Paint', 'options' => ['Solid Black', 'Solid White', 'Red']], ['name' => 'Roof', 'options' => ['Body Color Roof', 'Glass Roof']], ['name' => 'Battery', 'options' => ['70D', '85D', 'P85D']]), 'specifications' => []], ['dir' => 'models', 'files' => File::files(database_path() . '/seeds/demo/models')], ['70d' => ['option' => ['Solid Black', 'Body Color Roof', '70D'], 'price' => 75000, 'cover' => 'black.png'], '85d' => ['option' => ['Solid White', 'Body Color Roof', '85D'], 'price' => 85000, 'cover' => 'white.png'], 'p85d' => ['option' => ['Red', 'Glass Roof', 'P85D'], 'price' => 108000, 'cover' => 'red.png']]);
     $watch = $this->createProduct(['product_name' => 'Apple Watch', 'status' => 'available', 'product_desc' => '', 'options' => array(['name' => 'Size', 'options' => ['38mm', '48mm']], ['name' => 'Case', 'options' => ['Silver Aluminum', 'Stainless Steel']], ['name' => 'Band', 'options' => ['White Sport Band', 'Black Sport Band', 'Black Classic Buckle', 'Milanese Loop', 'Black Modern Buckle', 'Link Bracelet']]), 'specifications' => []], ['dir' => 'watch', 'files' => File::files(database_path() . '/seeds/demo/watch')], [['option' => ['38mm', 'Stainless Steel', 'White Sport Band'], 'price' => 549, 'cover' => 'w38ss-sbwh-sel.jpg'], ['option' => ['42mm', 'Stainless Steel', 'Black Sport Band'], 'price' => 599, 'cover' => 'w42ss-sbbk-sel.jpg'], ['option' => ['38mm', 'Stainless Steel', 'Black Classic Buckle'], 'price' => 649, 'cover' => 'w38ss-cbbk-sel.jpg'], ['option' => ['42mm', 'Stainless Steel', 'Milanese Loop'], 'price' => 699, 'cover' => 'w42ss-ml-sel_GEO_US.jpg'], ['option' => ['38mm', 'Stainless Steel', 'Black Modern Buckle'], 'price' => 749, 'cover' => 'w38ss-mbbk-sel.jpg'], ['option' => ['42mm', 'Stainless Steel', 'Link Bracelet'], 'price' => 999, 'cover' => 'w42ss-slsi-sel.jpg']]);
     $files = [];
     foreach (File::files(database_path() . '/seeds/demo/pages') as $path) {
         $filename = basename($path);
         $files[$filename] = UploadFile::create(array('file' => (string) Image::make($path)->encode('data-url'), 'file_name' => $filename));
     }
     Page::create(['title' => 'Index', 'pathname' => 'index', 'position' => 'index', 'settings' => ['widgets' => [['widget' => 'Offical.Slider', 'style' => ['padding' => '0px'], 'data' => ['<div class="slide-item" style="background-image:url(' . $files['slider.models.jpg']->file_path . ');background-size:cover;">
                             <div style="position:relative;left:50%;width:50%;height:100%;">
                                 <div style="position: relative;top: 10%;left: -50%;width: 100%;">
                                     <h1>
                                         TESLA&reg; Model S
                                     </h1>
                                     <p class="lead">
                                         Highest safety rating in America<br />
                                         Autopilot equipped<br />
                                         Available All-Wheel Drive Dual Motor<br />
                                         Zero to 60 mph in as little as 2.8 seconds<br />
                                         Up to 270 miles range (EPA)<br />
                                         <a href="/models">Learn More</a>
                                     </p>
                                 </div>
                             </div>
                         </div>', '<div class="slide-item" style="background-image:url(' . $files['slider.watch.png']->file_path . ');background-size:692px 224px;">
                             <div style="position:relative;left:50%;width:50%;height:100%;">
                                 <div style="text-align:center; position: relative;top: 10%;left: -50%;width: 100%;">
                                     <h1 style="font-size:4em;"><i class="ion-social-apple"></i>&nbsp;WATCH</h1>
                                     <p class="lead" style="font-size:2em">The Watch is <a href="/watch">here</a></p>
                                 </div>
                             </div>
                         </div>']]]]]);
     Page::create(['title' => 'Buy Models', 'pathname' => 'models/buy', 'position' => 'models', 'settings' => ['button' => ['className' => 'btn btn-primary btn-sm', 'text' => 'Buy Now'], 'widgets' => [['widget' => 'Offical.Header', 'id' => '#models_header', 'data' => ['title' => '<a href="/models">TESLA Model S</a>', 'position' => 'models']], ['widget' => 'Offical.ProductPicker', 'data' => ['product_id' => 1]], ['widget' => 'Offical.PureHTML', 'style' => ['background' => 'whitesmoke'], 'data' => '<div class="container text-center" style="width:65%">
                                     <div>
                                     <h1>Battery, Performance, and Drive options</h1>
                                     <p class="lead">Every Model S includes free long distance travel using Tesla\'s Supercharger network and an eight year, infinite mile battery and drive warranty.</p>
                                     </div>
                                     <div class="row">
                                         <div class="col-xs-4">
                                             <div style="background-color:white;border:1px solid #cccccc;text-align:left;height:400px;">
                                                 <h1 class="text-center"><span style="color:#aaa;">70</span><strong>D</strong></h1>
                                                 <ol style="list-style:none;padding:15px;">
                                                     <li style="text-align: center;margin-top: -20px;padding-bottom: 20px;border-bottom: 1px solid #ccc;margin-bottom: 20px;"><strong>All-Wheel Drive</strong></li>
                                                     <li class="package-detail">70 kWh battery with all-wheel drive</li>
                                                     <li class="package-detail"><strong>240</strong> miles range (EPA)</li>
                                                     <li class="package-detail"><strong>5.2</strong> seconds 0-60 mph</li>
                                                     <li class="package-detail"><strong>13.5</strong> seconds ¼ mile</li>
                                                     <li class="package-detail"><strong>328</strong> hp<br>
                                                     <strong>259</strong> hp front and rear motor power</li>
                                                     <li class="package-detail"><strong>387</strong> lb-ft motor torque</li>
                                                     <li class="package-detail"><strong>140</strong> mph top speed</li>
                                                 </ol>
                                             </div>
                                         </div>
                                         <div class="col-xs-4">
                                             <div style="background-color:white;border:1px solid #cccccc;text-align:left;height:400px;">
                                                 <h1 class="text-center"><span style="color:#aaa;">85</span><strong>D</strong></h1>
                                                 <ol style="list-style:none;padding:15px;">
                                                     <li style="text-align: center;margin-top: -20px;padding-bottom: 20px;border-bottom: 1px solid #ccc;margin-bottom: 20px;"><strong>All-Wheel Drive</strong></li>
                                                     <li>85 kWh battery with all-wheel drive<br>
                                                     90 kWh upgrade increases range 6%</li>
                                                     <li><strong>270</strong> miles range (EPA)</li>
                                                     <li><strong>4.2</strong> seconds 0-60 mph</li>
                                                     <li><strong>12.5</strong> seconds ¼ mile</li>
                                                     <li><strong>417</strong> hp <br>
                                                     <strong>259</strong> hp front and rear motor power</li>
                                                     <li><strong>485</strong> lb-ft motor torque</li>
                                                     <li><strong>155</strong> mph top speed</li>
                                                 </ol>
                                             </div>
                                         </div>
                                         <div class="col-xs-4">
                                             <div style="background-color:white;border:1px solid #cccccc;text-align:left;height:400px;">
                                                 <h1 class="text-center"><span style="color:red;font-weight:bold;">P</span><span style="color:#aaa;">85</span><strong style="color:red;">D</strong></h1>
                                                 <ol style="list-style:none;padding:15px;">
                                                     <li style="text-align: center;margin-top: -20px;padding-bottom: 20px;border-bottom: 1px solid #ccc;margin-bottom: 20px;"><strong>Performance All-Wheel Drive</strong></li>
                                                     <li>85 kWh battery with all-wheel drive<br>
                                                     90 kWh upgrade increases range 6%</li>
                                                     <li><strong>253</strong> miles range (EPA)</li>
                                                     <li><strong>3.1</strong> seconds 0-60 mph<br>
                                                     <strong>2.8</strong> seconds 0-60 mph with Ludicrous Speed Upgrade</li>
                                                     <li><strong>10.9</strong> seconds ¼ mile with Ludicrous Speed Upgrade</li>
                                                     <li><strong>259</strong> hp front motor power <br>
                                                     <strong>503</strong> hp rear motor power</li>
                                                     <li><strong>713</strong> lb-ft motor torque</li>
                                                     <li><strong>155</strong> mph top speed</li>
                                                 </ol>
                                             </div>
                                         </div>
                                     </div>
                                  </div>']]]]);
     Page::create(['title' => 'Model S', 'pathname' => 'models', 'position' => 'nav', 'settings' => ['effect' => ['name' => 'scrollmagic', 'pins' => [['element' => '#models_header', 'scene' => ['offset' => 50], 'settings' => ['pushFollowers' => false]]]], 'widgets' => [['widget' => 'Offical.Header', 'id' => 'models_header', 'data' => ['title' => 'TESLA Model S', 'position' => 'models']], ['style' => ['padding' => '0px', 'marginTop' => '-50px'], 'widget' => 'Offical.PureHTML', 'data' => '<div style="height:674px; background-image:url(' . $files['models.section.jpg']->file_path . ');background-size:cover;">
                                     <div style="position:relative;left:50%;width:50%;height:100%;">
                                         <div style="position: relative;top: 15%;left: -50%; color:white; width: 100%; text-align:right">
                                             <p class="lead" style="font-size:1.5em">
                                                 Highest safety rating in America<br />
                                                 Autopilot equipped<br />
                                                 Available All-Wheel Drive Dual Motor<br />
                                                 Zero to 60 mph in as little as 2.8 seconds<br />
                                                 Up to 270 miles range (EPA)
                                             </p>
                                         </div>
                                     </div>
                                 </div>'], ['widget' => 'Offical.PureHTML', 'data' => '<div class="text-center container" style="width:55%">
                                     <h1>Zero Emissions. Zero Compromises.</h1>
                                     <p class="lead" style="font-size:1.2em">
                                         Tesla’s advanced electric powertrain delivers exhilarating performance. Unlike a gasoline internal combustion engine with hundreds of moving parts, Tesla electric motors have only one moving piece: the rotor. As a result, Model S acceleration is instantaneous, silent and smooth. Step on the accelerator and in as little as 2.8 seconds Model S is travelling 60 miles per hour, without hesitation, and without a drop of gasoline. Model S is an evolution in automobile engineering.
                                     </p>
                                 </div>'], ['widget' => 'Offical.PureHTML', 'style' => ['background' => 'white'], 'data' => '<div class="text-center">
                                     <figure>
                                         <video type="video/mp4" src="http://www.teslamotors.com/sites/default/files/images/model-s/videos/powertrain-dualmotor-p85d.mp4" class="media-element media-video" autoplay="" loop=""></video>
                                     </figure>
                                     <div class="container" style="width:55%">
                                         <h1>All-Wheel Drive Dual Motor</h1>
                                         <p class="lead">
                                             Dual Motor Model S is a categorical improvement on conventional all-wheel drive systems. With two motors, one in the front and one in the rear, Model S digitally and independently controls torque to the front and rear wheels. The result is unparalleled traction control in all conditions.
                                         </p>
                                     </div>
                                 </div>'], ['widget' => 'Offical.ImageParkText', 'style' => ['background' => 'whitesmoke'], 'data' => ['text' => ['title' => 'Zero profile door handles', 'subtitle' => 'Model S door handles are a work of art. When a key is in close proximity, they automatically extend. When no longer in use, they retract into the body of the car, creating a seamless surface for air to pass over.'], 'img' => ['src' => $files['models.door-handles-black.jpg']->file_path]]], ['widget' => 'Offical.ImageParkText', 'style' => ['background' => 'white'], 'data' => ['text' => ['title' => 'Hidden in plain sight', 'subtitle' => 'Scan the streamlined body panels and you\'ll discover that Model S lacks a fuel door. Approach the driver\'s side taillight with a charging connector and the hidden charge port automatically opens. The charging connector cannot be removed until Model S is unlocked.'], 'img' => ['src' => $files['models.charging-default.jpg']->file_path]]], ['widget' => 'Offical.Slider', 'style' => ['padding' => '0px'], 'settings' => ['indicators' => false, 'className' => 'carousel-fade'], 'data' => ['<figure>
                             <img src="' . $files['models.gallery.1.jpg']->file_path . '" />
                          </figure>', '<figure>
                             <img src="' . $files['models.gallery.2.jpg']->file_path . '" />
                          </figure>', '<figure>
                             <img src="' . $files['models.gallery.3.jpg']->file_path . '" />
                          </figure>', '<figure>
                             <img src="' . $files['models.gallery.4.jpg']->file_path . '" />
                          </figure>', '<figure>
                             <img src="' . $files['models.gallery.5.jpg']->file_path . '" />
                          </figure>', '<figure>
                             <img src="' . $files['models.gallery.6.jpg']->file_path . '" />
                          </figure>', '<figure>
                             <img src="' . $files['models.gallery.7.jpg']->file_path . '" />
                          </figure>', '<figure>
                             <img src="' . $files['models.gallery.8.jpg']->file_path . '" />
                          </figure>', '<figure>
                             <img src="' . $files['models.gallery.9.jpg']->file_path . '" />
                          </figure>']], ['widget' => 'Offical.ImageParkText', 'style' => ['background' => 'whitesmoke'], 'data' => ['text' => ['title' => 'Exquisite materials', 'subtitle' => 'Every surface, seam, and stitch is a carefully considered balance between tactile, visual, and environmental friendliness. Door handles are made from hand polished zinc, the leather trim uses premium Nappa leather, and décor pieces are minimally finished to preserve their natural beauty. Materials are sourced as close to our California factory as possible to reduce the environmental impact of transporting them long distances.'], 'img' => ['src' => $files['models.obeche-matte-yacht-floor.jpg']->file_path]]], ['widget' => 'Offical.ImageParkText', 'style' => ['background' => 'white'], 'data' => ['text' => ['title' => 'The touchscreen', 'subtitle' => 'The Model S 17 inch touchscreen controls most of the car\'s functions. Opening the all glass panoramic roof, customizing the automatic climate control, and changing the radio station all happen with a swipe or a touch. The touchscreen, digital instrument cluster, and steering wheel controls seamlessly integrate media, navigation, communications, cabin controls and vehicle data.'], 'img' => '<iframe src="//player.vimeo.com/video/61821553" width="430" height="240" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>']], ['widget' => 'Offical.PureHTML', 'style' => ['background' => 'whitesmoke'], 'data' => '<div class="container text-center">
                                     <a href="/models/buy" class="btn btn-lg btn-danger">GET YOUR MODEL S NOW</a>
                                 </div>']]]]);
     Page::create(['title' => 'Buy Watch', 'pathname' => 'watch/buy', 'position' => 'watch', 'settings' => ['button' => ['className' => 'btn btn-primary btn-sm', 'text' => 'Buy'], 'effect' => ['name' => 'scrollmagic', 'pins' => [['element' => '#watch_header', 'scene' => ['offset' => 50], 'settings' => ['pushFollowers' => false]]]], 'widgets' => [['widget' => 'Offical.Header', 'id' => 'watch_header', 'data' => ['title' => '<a href="/watch"><i class="ion-social-apple"></i>&nbsp;WATCH</a>', 'position' => 'watch']], ['widget' => 'Offical.ProductSelector', 'data' => ['product_id' => 2, 'title' => '<i class="ion-social-apple"></i>&nbsp;WATCH', 'template' => '${option[0]} ${option[1]} Case with ${option[2]}']], ['widget' => 'Offical.ImageParkText', 'style' => ['background' => 'white', 'padding' => '0px', 'borderTop' => '1px solid #ccc'], 'data' => ['text' => ['title' => 'Stainless steel case.', 'subtitle' => 'The case is crafted from a refined 316L stainless steel that’s been cold forged, making it up to 80 percent harder. It’s less susceptible to nicks and corrosion and has a beautiful mirror finish.'], 'img' => ['src' => $files['watch.watch-case-bb-201504a.jpeg']->file_path]]], ['widget' => 'Offical.ImageParkText', 'style' => ['background' => 'white', 'padding' => '0px', 'borderTop' => '1px solid #ccc'], 'data' => ['text' => ['title' => 'Sapphire crystal display.', 'subtitle' => 'The display is protected by ultra-hard, polished, precision-machined sapphire crystal.'], 'img' => ['src' => $files['watch.watch-display-bb-201504a.jpeg']->file_path]]], ['widget' => 'Offical.ImageParkText', 'style' => ['background' => 'white', 'padding' => '0px', 'borderTop' => '1px solid #ccc'], 'data' => ['text' => ['title' => 'Fine leather, durable fluoroelastomer, and polished stainless steel bands.', 'subtitle' => 'Choose from three different leather bands, a high-performance fluoroelastomer band, a link bracelet, and a Milanese loop.'], 'img' => '<img src="' . $files['watch.watch-band-static-bb-201504a.jpeg']->file_path . '" style="max-height:575px" />']]]]]);
     Page::create(['title' => 'Watch', 'pathname' => 'watch', 'position' => 'nav', 'settings' => ['widgets' => [['widget' => 'Offical.Header', 'id' => 'watch_header', 'style' => ['background' => 'transparent', 'color' => '#fff', 'fontWeight' => 'bold'], 'data' => ['title' => '<i class="ion-social-apple"></i>&nbsp;WATCH', 'position' => 'watch']], ['widget' => 'Offical.Slider', 'style' => ['padding' => '0px', 'marginTop' => '-50px'], 'settings' => ['indicators' => false, 'className' => 'carousel-fade', 'controls' => false, 'pauseOnHover' => false], 'data' => ['<div style="position:relative;">
                             <div style="position:absolute; top:15%; width:100%; left:0; text-align:center; font-size: 4em; font-weight:100; color:white">
                                 Notifications. Activity. Siri. Apple Pay.
                                 <br />Right on your wrist.
                             </div>
                             <figure>
                                 <img src="' . $files['watch.hero_dance_large_2x.jpg']->file_path . '" />
                             </figure>
                         </div>', '<div style="position:relative;">
                             <div style="position:absolute; top:15%; width:100%; left:0; text-align:center; font-size: 4em; font-weight:100; color:white">
                                 Notifications. Activity. Siri. Apple Pay.
                                 <br />Right on your wrist.
                             </div>
                             <figure>
                                 <img src="' . $files['watch.hero_sunset_large_2x.jpg']->file_path . '" />
                             </figure>
                         </div>', '<div style="position:relative;">
                             <div style="position:absolute; top:15%; width:100%; left:0; text-align:center; font-size: 4em; font-weight:100; color:white">
                                 Notifications. Activity. Siri. Apple Pay.
                                 <br />Right on your wrist.
                             </div>
                             <figure>
                                 <img src="' . $files['watch.hero_kiss_large_2x.jpg']->file_path . '" />
                             </figure>
                         </div>']], ['widget' => 'Offical.PureHTML', 'style' => ['padding' => '0px'], 'data' => '<div style="background:#f2f2f2">
                                 <div class="container text-center">
                                     <h1>Our most personal device yet.</h1>
                                     <p class="lead" style="width:60%;margin:auto">To make the best use of its size and location on your wrist, Apple Watch has all-new interactions and technologies. They let you do familiar things more quickly and conveniently. As well as some things that simply weren’t possible before. So using it is a whole new experience. One that’s more personal than ever.</p>
                                 </div>
                                 <figure>
                                 <img src="' . $files['watch.technology_hero_large_2x.jpg']->file_path . '" />
                                 </figure>
                                </div>'], ['widget' => 'Offical.PureHTML', 'style' => ['background' => 'white', 'padding' => '0px'], 'data' => '<div style="overflow:hidden;">
                                 <div class="container text-center">
                                     <h1>An incredibly precise timepiece.</h1>
                                     <p class="lead" style="width:60%;margin:auto">High-quality watches have long been defined by their ability to keep unfailingly accurate time, and Apple Watch is no exception. In conjunction with your iPhone, it keeps time within 50 milliseconds of the definitive global time standard. It even lets you customize your watch face to present time in a more meaningful, personal context that’s relevant to your life and schedule.</p>
                                 </div>
                                 <figure style="position:relative; margin-top:30px; margin-bottom:-500px; width:711px; height:898px; margin-left:auto; margin-right:auto; background-image:url(' . $files['watch.timekeeping_hero_large_2x.jpg']->file_path . '); background-size:711px 898px;">
                                 </figure>
                                </div>'], ['widget' => 'Offical.PureHTML', 'style' => ['padding' => '0px'], 'data' => '<div style="background:#f2f2f2">
                                 <div class="container text-center">
                                     <h1>Entirely new ways to stay in touch.</h1>
                                     <p class="lead" style="width:60%;margin:auto">Apple Watch makes all the ways you’re used to communicating more convenient. And because it sits right on your wrist, it can add a physical dimension to alerts and notifications. For example, you’ll feel a gentle tap with each incoming message. Apple Watch also lets you connect with your favorite people in fun, spontaneous ways — like sending a tap, a sketch, or even your heartbeat.</p>
                                 </div>
                                 <figure>
                                 <img src="' . $files['watch.communication_hero_large_2x.jpg']->file_path . '" />
                                 </figure>
                                </div>'], ['widget' => 'Offical.PureHTML', 'style' => ['background' => 'white', 'padding' => '0px'], 'data' => '<div style="overflow:hidden;">
                                 <div class="container text-center">
                                     <h1>A smarter way to look at fitness.</h1>
                                     <p class="lead" style="width:60%;margin:auto">Apple Watch gives you a complete picture of your all-day activity. The three rings of the Activity app show your daily progress and help motivate you to sit less, move more, and get some exercise. It’s also an advanced sports watch, giving you real-time stats for a variety of the most popular workouts. Over time, Apple Watch learns your activity and fitness levels. It uses that information to improve the accuracy of your measurements and suggest personalized all-day activity goals. It even provides custom reminders to encourage you to achieve them.</p>
                                 </div>
                                 <figure style="position:relative; margin-top:30px; margin-bottom:-400px; width:1035px; height:931px; margin-left:auto; margin-right:auto; background-image:url(' . $files['watch.health_hero_large_2x.jpg']->file_path . '); background-size:1035px 931px;">
                                 </figure>
                                </div>']]]]);
     $this->command->info('Demo data seeded!');
 }
Пример #11
0
 /**
  * Store a newly created resource in storage.
  *
  * @param PageRequest $request
  * @return \Illuminate\Http\Response
  */
 public function store(PageRequest $request)
 {
     Page::create($request->all());
     flash()->success('Page Created');
     return redirect('admin/page');
 }
Пример #12
0
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        Page::create(['key' => 'contacts', 'description' => 'Контакты', 'keywords' => '1', 'title' => '1', 'page_title' => 'Контакты', 'text' => '<div class="container">
	<div class="row">
		<div class="col-xs-6">
			<div class="contact Map island">
				<div id="map"></div>
				<div class="item location">
					<b>ул. Заводская 21а</b>, Зеленоград, г. Москва, 124527
				</div>
			</div>
		</div>
		<div class="col-xs-6">
			<div class="contact Info island">
				<h2>
					ООО “Колизей”
					<span>Мебельное производство корпусной мебели</span>
				</h2>
				<div class="item phone">
					Городской телефон<br>
					<a href="tel:+74959797858">+7 (495) 979-78-58</a>
				</div>
				<div class="item mobile">
					Мобильный телефон<br>
					<a href="tel:+79161234455">+7 (916) 123-44-55</a>
				</div>
				<div class="item time">
					Время работы<br>
					<b>Каждый день с 9:00 до 22:00</b>
					<div class="help">Заказы через корзину интернет-магазина принимаются круглосуточно и обрабатываются в рабочие часы магазина.</div>
				</div>
				<div class="item mail">
					Электронная почта<br>
					<a href="mailto:mail@kolizej.ru">mail@kolizej.ru</a>
				</div>
				<div class="item partner">
					Будем рады сотрудничеству с Вами!
				</div>
			</div>
		</div>
		<div class="clear"></div>
	</div>
</div>
<div class="bigheight clear"></div>']);
        Page::create(['key' => 'orderFurniture', 'description' => 'Мебель на заказ', 'keywords' => '1', 'title' => '1', 'page_title' => 'Мебель на заказ', 'text' => '<div class="container">
	<div class="island">
		<p>Наши специалисты изготовят для Вас корпусную мебель (шкафы, кухни, столы, стенки) на заказ по индивидуальным чертежам.</p>

		<p>Звоните в офис по номеру <a href="tel:+74959797858">+7 (495) 979-78-58</a></p>
	</div>
</div>']);
        Page::create(['key' => 'wholesalers', 'description' => 'Оптовикам', 'keywords' => '1', 'title' => '1', 'page_title' => 'Оптовикам', 'text' => '<div class="container">
	<div class="island">
		<p>У нашей компании 15-летний опыт работы с оптовиками и магазинами. Поскольку, мы, являемся производителями мебели, то можем предложить нашим партнерам самые выгодные условия. У нас действует система скидок от объема покупки, гибкие условия оплаты, гарантия на все товары, информационная поддержка и рекламные материалы. </p>

		<p>Если Вас заинтересовало наше предложение звоните в офис по телефону <a href="tel:+74959797858">+7 (495) 979-78-58</a> или пишите на электронную почту <a href="mailto:mail@kolizej.ru">mail@kolizej.ru</a></p>
	</div>
</div>']);
        Page::create(['key' => 'delivery', 'description' => 'Доставка', 'keywords' => '1', 'title' => '1', 'page_title' => 'Доставка', 'text' => '<div class="container">
	<div class="row">
		<div class="col-xs-6">
			<div class="delivery island">
				<h2>Доставка</h2>

				<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa.</p>

				<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.</p>

				<p>Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium.</p>

				<p>Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim.</p>

				<p>Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue.</p>

				<p>Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem.</p>
			</div>
		</div>
		<div class="col-xs-6">
			<div class="payment island">
				<h2>Оплата</h2>

				<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa.</p>

				<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.</p>

				<p>Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium.</p>

				<p>Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim.</p>

				<p>Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue.</p>

				<p>Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem.</p>
			</div>
		</div>
		<div class="clear"></div>
	</div>
</div>']);
    }
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(Request $request)
 {
     //$this->validate($request, ['name' => 'required']); // Uncomment and modify if you need to validate any input.
     Page::create($request->all());
     return redirect('pages');
 }
Пример #14
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     $now = date('Y-m-d H:i:s');
     // Test Oauth session
     $session_id = DB::table('oauth_sessions')->insertGetId(['client_id' => 'default', 'owner_type' => 'user', 'owner_id' => "user:1", 'created_at' => $now, 'updated_at' => $now]);
     DB::table('oauth_access_tokens')->insert(['id' => 'SyjKhdQ1JcKs1S6X18VQW2LaTclJYzW4AC1dfkFk', 'session_id' => $session_id, 'expire_time' => time() + 86400 * 30, 'created_at' => $now, 'updated_at' => $now]);
     $session_id = DB::table('oauth_sessions')->insertGetId(['client_id' => 'default', 'owner_type' => 'user', 'owner_id' => "admin:1", 'created_at' => $now, 'updated_at' => $now]);
     DB::table('oauth_access_tokens')->insert(['id' => 'L3gkUwlwCQpUFGwbbX9HuAmc9YsMh8Oe42OQRNiY', 'session_id' => $session_id, 'expire_time' => time() + 86400 * 30, 'created_at' => $now, 'updated_at' => $now]);
     // User
     DB::table('users')->truncate();
     $user = new User();
     $users = array(array('email' => '*****@*****.**', 'nickname' => 'garbin', 'name' => 'Garbin Huang', 'password' => '123456', 'avatar' => 'http://tp3.sinaimg.cn/1812747674/180/5606472968/1'));
     foreach ($users as $user) {
         $user = new User($user);
         $user->save();
     }
     // Operator
     $operator_user = User::find(1);
     $operator_admin = Admin::find(1);
     $operator_system = new SystemOperator();
     // Category
     DB::table('categories')->truncate();
     $cate_mac = Category::create(array('category_name' => 'Mac', 'parent_id' => 0));
     $cate_mac->children()->create(['category_name' => 'Macbook Pro']);
     $cate_mac->children()->create(['category_name' => 'Macbook Air']);
     $cate_mac->children()->create(['category_name' => 'iMac']);
     $cate_mac->children()->create(['category_name' => 'Mac mini']);
     $cate_mac->children()->create(['category_name' => 'Mac Pro']);
     $cate_mac = Category::create(array('category_name' => 'iPhone', 'parent_id' => 0));
     $cate_iphone6 = $cate_mac->children()->create(['category_name' => 'iPhone 6']);
     $cate_iphone5s = $cate_mac->children()->create(['category_name' => 'iPhone 5s']);
     // Product
     foreach (['products', 'product_2_category', 'product_photos', 'product_stocks'] as $table) {
         DB::table($table)->truncate();
     }
     $iphone6 = Product::create(array('product_name' => 'iPhone 6', 'status' => 'available', 'product_desc' => 'Bigger than bigger', 'options' => array(['name' => '颜色', 'options' => ['银色', '深空灰', '香槟金']], ['name' => '容量', 'options' => ['16GB', '64GB', '128GB']]), 'specifications' => [['attr_name' => '高度', 'attr_group' => '重量和尺寸', 'attr_value' => '138.1 毫米(5.44 英寸)'], ['attr_name' => '宽度', 'attr_group' => '重量和尺寸', 'attr_value' => '67.0 毫米 (2.64 英寸)'], ['attr_name' => '厚度', 'attr_group' => '重量和尺寸', 'attr_value' => '6.9 毫米 (0.27 英寸)'], ['attr_name' => '重量', 'attr_group' => '重量和尺寸', 'attr_value' => '129 克 (4.55 盎司)']]));
     $all_photo = new UploadFile(array('file' => (string) Image::make(database_path() . '/seeds/files/iphone6p-all.png')->encode('data-url'), 'file_name' => 'iphone6p-all.png'));
     $all_photo->save();
     $gray_photo = new UploadFile(array('file' => (string) Image::make(database_path() . '/seeds/files/iphone6p-gray.png')->encode('data-url'), 'file_name' => 'iphone6p-gray.png'));
     $gray_photo->save();
     $gold_photo = new UploadFile(array('file' => (string) Image::make(database_path() . '/seeds/files/iphone6p-gold.png')->encode('data-url'), 'file_name' => 'iphone6p-gold.png'));
     $gold_photo->save();
     $gold_photo = new UploadFile(array('file' => (string) Image::make(database_path() . '/seeds/files/iphone6p-silver.png')->encode('data-url'), 'file_name' => 'iphone6p-silver.png'));
     $gold_photo->save();
     $iphone6->photos()->save(new ProductPhoto(['product_id' => $iphone6->id, 'file_id' => $all_photo->id, 'sort_index' => 0]));
     $iphone6->photos()->save(new ProductPhoto(['product_id' => $iphone6->id, 'file_id' => $gray_photo->id, 'sort_index' => 1]));
     $iphone6->photos()->save(new ProductPhoto(['product_id' => $iphone6->id, 'file_id' => $gold_photo->id, 'sort_index' => 2]));
     $gray_iphone616 = $iphone6->stocks()->create(array('sku' => uniqid(), 'option' => ['深空灰', '16GB'], 'stocks' => 100, 'price' => 5288, 'cover_id' => $gray_photo->id));
     $gray_iphone664 = $iphone6->stocks()->create(array('sku' => 'iphone664-gray', 'option' => ['深空灰', '64GB'], 'stocks' => 100, 'price' => 6088));
     $gray_iphone6128 = $iphone6->stocks()->create(array('sku' => 'iphone6128-gray', 'option' => ['深空灰', '128GB'], 'stocks' => 100, 'price' => 6888));
     $silver_iphone616 = $iphone6->stocks()->create(array('sku' => 'iphone616-gray', 'option' => ['银色', '16GB'], 'stocks' => 100, 'price' => 5288));
     $gold_iphone616 = $iphone6->stocks()->create(array('sku' => 'iphone616-gold', 'option' => ['香槟金', '16GB'], 'stocks' => 100, 'price' => 5288));
     $iphone5s = Product::create(array('product_name' => 'iPhone 5S', 'status' => 'available', 'product_desc' => 'out stock', 'options' => array(['name' => '颜色', 'options' => ['银色', '深空灰', '香槟金']], ['name' => '容量', 'options' => ['16GB', '32GB', '64GB']])));
     $iphone6->categories()->attach($cate_iphone6->id);
     // Bag
     foreach (['bags', 'orders', 'order_products', 'logistics', 'payments'] as $table) {
         DB::table($table)->truncate();
     }
     $logistics = Logistics::create(array('logistics_name' => '标准运送', 'status' => 'enabled', 'logistics_desc' => '标准运送,免费送货', 'deliverer_name' => '\\App\\Plugins\\Offical\\Deliverers\\Simple', 'deliverer_settings' => array('effective' => '当日达', 'price' => 8), 'deliverer_cod' => array('北京' => array('北京' => array('朝阳区')), '福建' => array('福州' => array('仓山区')))));
     $payment = Payment::create(array('payment_name' => '支付宝', 'status' => 'enabled', 'payment_desc' => '支付宝即时到账支付', 'gateway_name' => '\\App\\Plugins\\Offical\\Payments\\Alipay\\Main', 'gateway_settings' => array('pid' => '111', 'key' => '222')));
     $page = Page::create(["title" => "首页轮播", "pathname" => "index", "position" => "index", "settings" => ['widgets' => json_decode('[{"widget":"Offical.Slider","style":{"padding":"0px","margin":"-50px 0px 0px 0px"},"data":["<div class=\\"slide-item\\" style=\\"background-image:url(http://images.apple.com/v/home/bx/images/music_hero_medium_2x.jpg)\\"><div class=\\"carousel-caption\\"><h3>Apple Music</h3><p>Free, three-month trial now available</p></div></div>","<div class=\\"slide-item\\" style=\\"background-image:url(http://images.apple.com/v/home/bx/images/music_hero_medium_2x.jpg)\\"><div class=\\"carousel-caption\\"><h3>Apple Music</h3><p>Free, three-month trial now available</p></div></div>"]},{"widget":"Offical.ItemsBelowText","className":"avatar","data":{"title":"Our Customers","subtitle":"They says Apple is awesome!","items":["<img src=\\"https://almsaeedstudio.com/themes/AdminLTE/dist/img/user5-128x128.jpg\\" alt=\\"User Image\\" /><a class=\\"users-list-name\\" href=\\"#\\">Alexander Pierce</a><span class=\\"users-list-date\\">Today</span>","<img src=\\"https://almsaeedstudio.com/themes/AdminLTE/dist/img/user7-128x128.jpg\\" alt=\\"User Image\\" /><a class=\\"users-list-name\\" href=\\"#\\">Alexander Pierce</a><span class=\\"users-list-date\\">Today</span>","<img src=\\"https://almsaeedstudio.com/themes/AdminLTE/dist/img/user6-128x128.jpg\\" alt=\\"User Image\\" /><a class=\\"users-list-name\\" href=\\"#\\">Alexander Pierce</a><span class=\\"users-list-date\\">Today</span>"]}}]')]]);
     $page = Page::create(["title" => "GoPro Hero 4", "pathname" => "hero4", "position" => "nav", "settings" => ['widgets' => json_decode('[{"widget":"Offical.Header","data":{"title":"GoPro Hero4","subtitle":"Be a hero","links":[{"text":"Overview","active":true,"href":"/hero4"},{"text":"Specs","href":"/hero4/specs"},{"text":"Gallery","href":"/hero4/gallery"},{"text":"Buy now","className":"btn btn-primary btn-sm","href":"/hero4/buy"}]}},{"widget":"Offical.Slider","style":{"padding":"0px","margin":"0px"},"data":["<div class=\\"slide-item\\" style=\\"background-image:url(http://images.apple.com/v/home/bx/images/music_hero_medium_2x.jpg)\\"><div class=\\"carousel-caption\\"><h3>Apple Music</h3><p>Free, three-month trial now available</p></div></div>","<div class=\\"slide-item\\" style=\\"background-image:url(http://images.apple.com/v/home/bx/images/music_hero_medium_2x.jpg)\\"><div class=\\"carousel-caption\\"><h3>Apple Music</h3><p>Free, three-month trial now available</p></div></div>"]},{"widget":"Offical.ImageParkText","style":{"backgroundColor":"whitesmoke"},"data":{"text":{"title":"Professional video quality.","subtitle":"HERO4 Session delivers stunning video quality. Capture high-resolution 1440p30 and 1080p60 video that’s sharp and lifelike. High frame rate 720p100 video enables exceptionally smooth slow-motion playback of your best moments."},"img":"http://demandware.edgesuite.net/aasj_prd/on/demandware.static/-/Sites-gopro-products/default/dw3d8fb012/cam-respresent-four/HERO4_Session_Feature_2_video.jpg"}},{"style":{"backgroundColor":"white"},"widget":"Offical.ImageParkText","data":{"text":{"title":"Smallest, lightest GoPro yet.","subtitle":"50% smaller and 40% lighter than other HERO4 cameras,1 HERO4 Session is the most wearable and mountable GoPro ever. With a sleek, versatile design, it’s at home anywhere—from the surf to the snow, to hanging with friends."},"img":"http://demandware.edgesuite.net/aasj_prd/on/demandware.static/-/Sites-gopro-products/default/dw80d5e42d/cam-respresent-four/HERO4_Session_Feature_1_smallestlightest.jpg"}},{"style":{"backgroundColor":"white"},"widget":"Offical.ImageParkText","data":{"text":{"title":"Easy one-button control.","subtitle":"A single press of the shutter button powers on the camera and begins capturing video or Time Lapse photos automatically. A second press of the shutter button stops recording and powers off the camera. It’s that simple."},"img":"http://demandware.edgesuite.net/aasj_prd/on/demandware.static/-/Sites-gopro-products/default/dw9f2ed908/cam-respresent-four/HERO4_Session_Feature_6_OneButton.jpg"}}]')]]);
     $page = Page::create(["title" => "Buy now", "pathname" => "hero4/buy", "position" => "hero4", "settings" => ['widgets' => json_decode('[{"widget":"Offical.Header","data":{"title":"GoPro Hero4","subtitle":"Be a hero","links":[{"text":"Overview","active":true,"href":"/hero4"},{"text":"Specs","href":"/hero4/specs"},{"text":"Gallery","href":"/hero4/gallery"},{"text":"Buy now","className":"btn btn-primary btn-sm","href":"/hero4/buy"}]}},{"widget":"Offical.Slider","style":{"padding":"0px","margin":"0px"},"data":["<div class=\\"slide-item\\" style=\\"background-image:url(http://images.apple.com/v/home/bx/images/music_hero_medium_2x.jpg)\\"><div class=\\"carousel-caption\\"><h3>Apple Music</h3><p>Free, three-month trial now available</p></div></div>","<div class=\\"slide-item\\" style=\\"background-image:url(http://images.apple.com/v/home/bx/images/music_hero_medium_2x.jpg)\\"><div class=\\"carousel-caption\\"><h3>Apple Music</h3><p>Free, three-month trial now available</p></div></div>"]},{"widget":"Offical.ImageParkText","style":{"backgroundColor":"whitesmoke"},"data":{"text":{"title":"Professional video quality.","subtitle":"HERO4 Session delivers stunning video quality. Capture high-resolution 1440p30 and 1080p60 video that’s sharp and lifelike. High frame rate 720p100 video enables exceptionally smooth slow-motion playback of your best moments."},"img":"http://demandware.edgesuite.net/aasj_prd/on/demandware.static/-/Sites-gopro-products/default/dw3d8fb012/cam-respresent-four/HERO4_Session_Feature_2_video.jpg"}},{"style":{"backgroundColor":"white"},"widget":"Offical.ImageParkText","data":{"text":{"title":"Smallest, lightest GoPro yet.","subtitle":"50% smaller and 40% lighter than other HERO4 cameras,1 HERO4 Session is the most wearable and mountable GoPro ever. With a sleek, versatile design, it’s at home anywhere—from the surf to the snow, to hanging with friends."},"img":"http://demandware.edgesuite.net/aasj_prd/on/demandware.static/-/Sites-gopro-products/default/dw80d5e42d/cam-respresent-four/HERO4_Session_Feature_1_smallestlightest.jpg"}},{"style":{"backgroundColor":"white"},"widget":"Offical.ImageParkText","data":{"text":{"title":"Easy one-button control.","subtitle":"A single press of the shutter button powers on the camera and begins capturing video or Time Lapse photos automatically. A second press of the shutter button stops recording and powers off the camera. It’s that simple."},"img":"http://demandware.edgesuite.net/aasj_prd/on/demandware.static/-/Sites-gopro-products/default/dw9f2ed908/cam-respresent-four/HERO4_Session_Feature_6_OneButton.jpg"}}]')]]);
     $page = Page::create(["title" => "DJI Phantom 3", "pathname" => "phantom3", "position" => "nav", "settings" => ['widgets' => []]]);
     $page = Page::create(["title" => "Apple Watch", "pathname" => "watch", "position" => "nav", "settings" => ['widgets' => []]]);
     $stock = ProductStock::with('product')->where('sku', '=', 'iphone616-gray')->first();
     $order = Order::create(['logistics_consignee' => 'Garbin Huang', 'logistics_region' => ['福建', '福州', '仓山区'], 'logistics_address' => '福湾新城春风苑2区6号楼802', 'logistics_zipcode' => '3500001', 'logistics_mobile' => '18610073651', 'logistics_phone' => '', 'logistics_email' => '*****@*****.**', 'logistics_id' => 1, 'logistics_cod' => false, 'logistics_tracking_number' => '', 'payment_id' => 1, 'user_id' => 1]);
     $order_products = [new OrderProduct(['product_id' => $stock->product->id, 'product_name' => $stock->product->product_name, 'sku' => $stock->sku, 'option' => $stock->option, 'price' => $stock->price, 'quantity' => 1, 'custom_info' => []])];
     $order->calc($order_products);
     $order->save();
     $order_product = $order->products()->saveMany($order_products);
     // Test Order
     $stock = ProductStock::with('product')->where('sku', '=', 'iphone616-gold')->first();
     $order = Order::create(['logistics_consignee' => 'Garbin Huang', 'logistics_region' => ['福建', '福州', '仓山区'], 'logistics_address' => '福湾新城春风苑2区6号楼802', 'logistics_zipcode' => '3500001', 'logistics_mobile' => '18610073651', 'logistics_phone' => '', 'logistics_email' => '*****@*****.**', 'logistics_id' => 1, 'logistics_cod' => true, 'logistics_tracking_number' => '', 'payment_id' => 1, 'user_id' => 1]);
     $order_products = [new OrderProduct(['product_id' => $stock->product->id, 'product_name' => $stock->product->product_name, 'sku' => $stock->sku, 'option' => $stock->option, 'price' => $stock->price, 'quantity' => 1, 'custom_info' => []])];
     $order->calc($order_products);
     $order->save();
     $order_product = $order->products()->saveMany($order_products);
     $this->command->info('Test Data seeded');
 }