当前位置: 首页>>代码示例>>PHP>>正文


PHP Provider::create方法代码示例

本文整理汇总了PHP中Provider::create方法的典型用法代码示例。如果您正苦于以下问题:PHP Provider::create方法的具体用法?PHP Provider::create怎么用?PHP Provider::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Provider的用法示例。


在下文中一共展示了Provider::create方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: create

 public function create($name)
 {
     if (array_key_exists($name, $this->mockClasses)) {
         return $this->mockClasses[$name];
     }
     return parent::create(func_get_args());
 }
开发者ID:mystlabs,项目名称:mistydepman,代码行数:7,代码来源:MockableProvider.php

示例2: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     Sms::create(['provider_id' => '1', 'name' => 'auth_key']);
     Sms::create(['provider_id' => '1', 'name' => 'sender_id']);
     Sms::create(['provider_id' => '1', 'name' => 'route']);
     Provider::create(array('name' => 'Msg91.com'));
     // $this->call("OthersTableSeeder");
 }
开发者ID:vijaysebastian,项目名称:sms,代码行数:14,代码来源:FaveoSmsDatabaseSeeder.php

示例3: run

 public function run()
 {
     //se ingresa el libro de darwin
     //DB::statement("INSERT INTO lor_lecture (title, author, year, publisher, content, created_at, updated_at, deleted_at) VALUES ('El origen de las especies', 'Charles Darwin', '1859', 'Dominio publico', 'temas vivos.', NOW(),NOW(), NULL);");
     $user = User::create(array('profile' => 'super_admin', 'firstname' => 'Alexander Andres Londono Espejo', 'username' => 'admin', 'email' => 'admin@admin.com', 'password' => Hash::make('admin')));
     $user->roles()->attach(1);
     $user->roles()->attach(2);
     $user->roles()->attach(3);
     $user->roles()->attach(4);
     $user->roles()->attach(5);
     $user->roles()->attach(6);
     $user->roles()->attach(7);
     $user->roles()->attach(8);
     $user->roles()->attach(9);
     $user->roles()->attach(10);
     $user->roles()->attach(11);
     $user->roles()->attach(12);
     $user->roles()->attach(13);
     $user->roles()->attach(14);
     $user->roles()->attach(15);
     $user->roles()->attach(16);
     $user->roles()->attach(17);
     $user->roles()->attach(18);
     $user->roles()->attach(19);
     $user->roles()->attach(20);
     $user->roles()->attach(21);
     $user->roles()->attach(22);
     $user->roles()->attach(23);
     $user->roles()->attach(24);
     $user->roles()->attach(25);
     $user->roles()->attach(26);
     $user->roles()->attach(27);
     $user->roles()->attach(28);
     $user->roles()->attach(29);
     $user->roles()->attach(30);
     $user->roles()->attach(31);
     $user->roles()->attach(32);
     $faker = Faker\Factory::create();
     $count_client = 50;
     foreach (range(1, $count_client) as $index) {
         $user = User::create(['firstname' => $faker->firstName, 'lastname' => $faker->lastName, 'username' => 'admin' . $index, 'email' => $faker->email, 'identification' => $faker->numberBetween(19999999, 99999999), 'password' => Hash::make('admin' . $index)]);
         //Ingreso datos de prueba de clientes
         $client = Client::create(['name' => $faker->company, 'address' => 'Caucasia Antioquia', 'enable' => 'SI']);
         //Ingreso datos de prueba de proveedores
         $provider = Provider::create(['name' => $faker->company, 'email' => $faker->email, 'telephone' => $faker->numberBetween(19999999, 99999999), 'country' => 'Colombia', 'department' => 'Antioquia', 'city' => 'Medellin', 'enable' => 'SI']);
         //Ingreso datos de prueba de costos
         $costs = Cost::create(['name' => $faker->company, 'type' => 'Otro', 'value' => $faker->numberBetween(1999, 99999), 'description' => $faker->company, 'resposible' => 'Alexander', 'enable' => 'SI']);
         //Ingreso datos de prueba de categoria
         $category = Category::create(['name' => $faker->company, 'description' => '', 'enable' => 'SI']);
         //Ingreso datos de prueba de productos
         $product = Product::create(['name' => $faker->company, 'description' => '', 'cost' => $faker->numberBetween(1999, 9999), 'value' => $faker->numberBetween(19999, 99999), 'enable' => 'SI']);
     }
 }
开发者ID:alexlondon07,项目名称:accounting,代码行数:53,代码来源:DevelopmentTableSeeder.php

示例4: store

 /**
  * Store a newly created resource in storage.
  * POST /adminsprovider
  *
  * @return Response
  */
 public function store()
 {
     $input = Input::only('rut', 'fancy_name', 'description', 'adress', 'city', 'location', 'phone_number');
     $this->providerRegistrationForm->validate($input);
     $provider = Provider::create($input);
     $authUser = Auth::user()->id;
     Event::fire('provider.created', [$provider, $authUser]);
     $amount = Input::only("amount");
     $products = Input::only("productos");
     //Insert products in pivot table product_provider
     Event::fire('provider.associeted', [$products, $provider, $amount]);
     return Redirect::action('AdminsProviderController@index');
 }
开发者ID:hilmysyarif,项目名称:erp,代码行数:19,代码来源:AdminsProviderController.php

示例5: run

 public function run()
 {
     Provider::create(['rut' => "78.238.140-7", 'adress' => "America 549", 'city' => "Santiago", 'location' => "San Miguel", 'phone_number' => "5544525", 'cellphone_number' => "09-93254385", 'supply_region' => "Región Metropolitana", 'fancy_name' => "Copol Limitada", 'description' => "Comercializado de Polietileno Copol Limitada", 'pyme' => true]);
 }
开发者ID:hilmysyarif,项目名称:erp,代码行数:4,代码来源:ProvidersTableSeeder.php


注:本文中的Provider::create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。