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


PHP Cliente::create方法代码示例

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


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

示例1: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Eloquent::unguard();
     // $this->call('UserTableSeeder');
     MaterialCategoria::create(array('nombre' => 'Sin Categoria', 'tipo' => 'unidad'));
     ModuloCategoria::create(array('nombre' => 'Sin Categoria'));
     Cliente::create(array('nombre' => 'Anonimo', 'apellido' => 'equis', 'persona' => 'n', 'identificacion' => '00000', 'telefono' => '00000', 'email' => 'anonimo@xxx.com', 'celular' => '00000', 'sexo' => 'm', 'nacimiento' => '00-00-00'));
     User::create(array('username' => 'master', 'email' => 'master@xxx.com', 'password' => Hash::make('123456'), 'role' => 'master'));
 }
开发者ID:tusotec,项目名称:Artecol,代码行数:14,代码来源:DatabaseSeeder.php

示例2: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     // Validator
     // leia mais sobre Validator em http://laravel.com/docs/validation
     $rules = array();
     $validator = Validator::make(Input::all(), $rules);
     if ($validator->fails()) {
         return Redirect::to('clientes/create')->withErrors($validator)->withInput(Input::except('password'));
     } else {
         // store
         Cliente::create($this->post_to_array($this->table_fields));
         //Session::flush();
         $alert[] = ['class' => 'alert-success', 'message' => 'Novo cliente adicionado!'];
         Session::flash('alerts', $alert);
         return Redirect::to('clientes');
     }
 }
开发者ID:waldenylson,项目名称:alfredapp,代码行数:22,代码来源:ClienteController.php

示例3: run

 public function run()
 {
     $faker = Faker::create('pt_BR');
     $faker->addProvider(new \Faker\Provider\pt_BR\Person($faker));
     // $faker->addProvider(new \Faker\Provider\en_US\Address($faker));
     // $faker->addProvider(new \Faker\Provider\en_US\PhoneNumber($faker));
     // $faker->addProvider(new \Faker\Provider\en_US\Company($faker));
     // $faker->addProvider(new \Faker\Provider\Lorem($faker));
     // $faker->addProvider(new \Faker\Provider\Internet($faker));
     foreach (range(1, 50) as $index) {
         //    title($gender = null|'male'|'female')     // 'Ms.'
         //    titleMale                                 // 'Mr.'
         //    titleFemale                               // 'Ms.'
         //    suffix                                    // 'Jr.'
         //    name($gender = null|'male'|'female')      // 'Dr. Zane Stroman'
         //    firstName($gender = null|'male'|'female') // 'Maynard'
         //    firstNameMale                             // 'Maynard'
         //    firstNameFemale                           // 'Rachel'
         //    lastName                                  // 'Zulauf'
         Cliente::create(['nome' => $faker->name(), 'telefone' => $faker->phoneNumber(), 'empresa' => $faker->company(), 'endereco' => $faker->streetAddress(), 'bairro' => $faker->secondaryAddress(), 'cidade' => $faker->city(), 'cep' => $faker->postcode(), 'uf' => $faker->state(), 'celular' => $faker->phoneNumber(), 'email' => $faker->email(), 'cnpj' => $faker->numerify('###.###.###-##'), 'ie' => $faker->numerify('###.###.###.###')]);
     }
 }
开发者ID:waldenylson,项目名称:alfredapp,代码行数:22,代码来源:ClientesTableSeeder.php

示例4: run

 public function run()
 {
     DB::table('Clientes')->delete();
     Cliente::create(array('nombre' => 'Aldo', 'apellido' => 'Alonso', 'correo' => 'aldoalonso@gmail.com', 'nombreUsuario' => 'aldo10'));
 }
开发者ID:anam48,项目名称:tickets3,代码行数:5,代码来源:ClienteTableSeeder.php

示例5: run

 public function run()
 {
     foreach (range(1, 6) as $index) {
         Cliente::create(['id_estado' => 2, 'id_alumno' => $index]);
     }
 }
开发者ID:mazebeat,项目名称:encuesta_umayor,代码行数:6,代码来源:ClientesTableSeeder.php


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