26 lines
592 B
PHP
26 lines
592 B
PHP
<?php
|
||
|
||
namespace App\Models;
|
||
|
||
use Illuminate\Database\Eloquent\Model;
|
||
|
||
class PriceB extends Model
|
||
{
|
||
protected $table = 'price_b';
|
||
protected $primaryKey = 'price_parkplaceid';
|
||
public $timestamps = true;
|
||
|
||
protected $fillable = [
|
||
'park_id', 'price_ptypeid', 'user_categoryid', 'price_month',
|
||
'price', 'prine_name', 'psection_id', 'pplace_id', 'operator_id',
|
||
];
|
||
|
||
/**
|
||
* 指定駐輪場IDの料金データ取得(スコープ)
|
||
*/
|
||
public function scopeForPark($query, $parkId)
|
||
{
|
||
return $query->where('park_id', $parkId);
|
||
}
|
||
}
|