/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $artist = new App\Artist();
     $artist->name = 'pablo picasso';
     $artist->date_of_birth = "1881-10-25";
     $artist->date_of_death = "1973-04-08";
     $artist->country = "Spanish";
     $artist->save();
 }
Ejemplo n.º 2
0
<?php

use Carbon\Carbon;
$factory->define(App\User::class, function (Faker\Generator $faker) {
    return ['name' => $faker->name, 'email' => $faker->email, 'password' => bcrypt(str_random(10)), 'remember_token' => str_random(10)];
});
$factory->define(App\Studio::class, function (Faker\Generator $faker) {
    $city = $faker->city;
    return ['slug' => str_slug($city), 'phone' => $faker->phoneNumber, 'fax' => rand(0, 1) ? $faker->phoneNumber : '', 'email' => $faker->safeEmail, 'address' => $faker->streetAddress, 'city' => $city, 'state' => $faker->stateAbbr, 'zip' => $faker->postcode];
});
$factory->define(App\Piece::class, function (Faker\Generator $faker) {
    return ['title' => ucwords(str_replace('.', '', $faker->unique()->text(12)))];
});
$factory->define(App\Artist::class, function (Faker\Generator $faker) {
    return ['first_name' => $faker->firstName, 'last_name' => $faker->lastName, 'bio' => $faker->paragraph];
});
$factory->define(App\Event::class, function (Faker\Generator $faker) {
    $starts = $faker->dateTimeBetween(Carbon::today()->subMonths(rand(0, 4)), Carbon::today()->addMonths(3));
    $ends = Carbon::instance($starts)->addHours(2);
    $prices = [25.0, 35.0, 45.0];
    $artist = App\Artist::find(rand(1, App\Artist::count()));
    return ['title' => ucwords(str_replace('.', '', $faker->text(22))), 'artist_id' => $artist->id, 'starts' => $starts, 'ends' => $ends, 'price' => $prices[rand(0, 2)], 'seats' => 30];
});
Ejemplo n.º 3
0
#dd( \Gloudemans\Shoppingcart\Facades\Cart::content());
# dd(\Illuminate\Support\Facades\Session::all());
#\Illuminate\Support\Facades\Session::flush();
#dd(Cache::pull('order1'))
#dd(\Illuminate\Support\Facades\Cache::get('user'));
?>
{!!\Collective\Html\FormFacade::open(['file='=>true,'action'=>'TestController@test'])!!}
{{--{!!\Collective\Html\FormFacade::file('image')!!}--}}
{{--<input type="text" name="name" value=""/>--}}
{{--<input type="text" name="role_id" value=""/>--}}
{{--<input type="checkbox" name="cb"/>--}}
<script src='https://www.google.com/recaptcha/api.js'></script>
<div class="g-recaptcha" data-sitekey="6LdkCQoTAAAAALNT3hXvjB3fQXX9Rc1_zmyd4LyF"></div>
<input type="submit" value="go"/>

{!!\Collective\Html\FormFacade::close()!!}
{{--</pre>--}}
{{--@include('layout.frontend.head')--}}
<?php 
$c = new \App\Artist();
$c->update(['talent' => 11]);
$order = new \App\Order();
$t = $order->with('deliveryDetailOfCustomer')->where('id', 50)->get()->toArray();
dd($t);
$cus = new \App\Customer();
$t = $cus->with('user')->get()->toArray();
dd();
?>
#$cd->render()

{{--@include('layout.frontend.footer')--}}
Ejemplo n.º 4
0
function getPeople($type = 0)
{
    $artists = [];
    Config::set('global.type', $type);
    $results = Cache::rememberForever('people_' . \App::getLocale() . '_' . $type, function () {
        return App\Artist::select('name', 'id')->where('lang', \App::getLocale())->where('type', Config::get('global.type'))->get();
    });
    if (count($results) > 0) {
        foreach ($results as $res) {
            $artists[] = $res->name . ' [' . $res->id . ']';
        }
    }
    return $artists;
}