本文整理汇总了PHP中Province::find方法的典型用法代码示例。如果您正苦于以下问题:PHP Province::find方法的具体用法?PHP Province::find怎么用?PHP Province::find使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Province
的用法示例。
在下文中一共展示了Province::find方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getConfig
/**
* Display a listing of the resource.
*
* @return Response
*/
public function getConfig()
{
if (Payment::VeryPayment() == false) {
return View::make('clinic.payment.renews-payment');
}
$user = Sentry::getUser();
$clinic = Clinic::where('user_id', $user->id)->first();
$adress = Address::find($clinic->address_id);
$province_id = City::find($adress->city_id)->province_id;
$country_id = Province::find($province_id)->country_id;
$option = $clinic->insurances;
#$option = Option::where('name', $clinic->id.'-clinic-insurance')->first();
$array = array();
if ($option) {
$segs = explode(',', $option);
$segok = '';
foreach ($segs as $seg) {
$very = Insurance::where('id', $seg)->first();
if ($very) {
$array[] = array('value' => $very->id, 'text' => $very->name);
}
}
}
/**/
$optionLang = Option::where('name', $clinic->id . '-clinic-lang')->first();
if (!$option) {
return View::make('clinic.config.config')->with('country_id', $country_id)->with('clinic', $clinic)->with('adress', $adress);
} else {
return View::make('clinic.config.config')->with('clinic', $clinic)->with('option', $array)->with('adress', $adress)->with('country_id', $country_id)->with('optionLang', $optionLang);
}
}
示例2: destroy
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
$this->province->find($id)->delete();
return Redirect::route('provinces.index');
}