public function run() { $faker = Faker::create(); foreach (range(1, 10) as $index) { PropertiesChannel::create([]); } }
/** * Store a newly created propertieschannel in storage. * * @return Response */ public function postStore() { $validator = Validator::make($data = Input::all(), PropertiesChannel::$rules); if ($validator->fails()) { return Redirect::back()->withErrors($validator)->withInput(); } $data['property_id'] = Property::getLoggedId(); PropertiesChannel::create($data); return Redirect::action('PropertiesChannelsController@getIndex'); }