1
0
Fork 0

fixed some bugs for customer

update ide helper
main
A1Gard 1 year ago
parent 5aa8aa882a
commit 69fbe25a09

@ -230,6 +230,7 @@ namespace PHPSTORM_META {
'view' => \Illuminate\View\Factory::class,
'view.engine.resolver' => \Illuminate\View\Engines\EngineResolver::class,
'view.finder' => \Illuminate\View\FileViewFinder::class,
'zarinpal-gateway' => \App\Payment\Zarinpal::class,
'zibal-gateway' => \App\Payment\Zibal::class,
]));
override(\Illuminate\Container\Container::makeWith(0), map([
@ -453,6 +454,7 @@ namespace PHPSTORM_META {
'view' => \Illuminate\View\Factory::class,
'view.engine.resolver' => \Illuminate\View\Engines\EngineResolver::class,
'view.finder' => \Illuminate\View\FileViewFinder::class,
'zarinpal-gateway' => \App\Payment\Zarinpal::class,
'zibal-gateway' => \App\Payment\Zibal::class,
]));
override(\Illuminate\Contracts\Container\Container::get(0), map([
@ -676,6 +678,7 @@ namespace PHPSTORM_META {
'view' => \Illuminate\View\Factory::class,
'view.engine.resolver' => \Illuminate\View\Engines\EngineResolver::class,
'view.finder' => \Illuminate\View\FileViewFinder::class,
'zarinpal-gateway' => \App\Payment\Zarinpal::class,
'zibal-gateway' => \App\Payment\Zibal::class,
]));
override(\Illuminate\Contracts\Container\Container::make(0), map([
@ -899,6 +902,7 @@ namespace PHPSTORM_META {
'view' => \Illuminate\View\Factory::class,
'view.engine.resolver' => \Illuminate\View\Engines\EngineResolver::class,
'view.finder' => \Illuminate\View\FileViewFinder::class,
'zarinpal-gateway' => \App\Payment\Zarinpal::class,
'zibal-gateway' => \App\Payment\Zibal::class,
]));
override(\Illuminate\Contracts\Container\Container::makeWith(0), map([
@ -1122,6 +1126,7 @@ namespace PHPSTORM_META {
'view' => \Illuminate\View\Factory::class,
'view.engine.resolver' => \Illuminate\View\Engines\EngineResolver::class,
'view.finder' => \Illuminate\View\FileViewFinder::class,
'zarinpal-gateway' => \App\Payment\Zarinpal::class,
'zibal-gateway' => \App\Payment\Zibal::class,
]));
override(\App::get(0), map([
@ -1345,6 +1350,7 @@ namespace PHPSTORM_META {
'view' => \Illuminate\View\Factory::class,
'view.engine.resolver' => \Illuminate\View\Engines\EngineResolver::class,
'view.finder' => \Illuminate\View\FileViewFinder::class,
'zarinpal-gateway' => \App\Payment\Zarinpal::class,
'zibal-gateway' => \App\Payment\Zibal::class,
]));
override(\App::make(0), map([
@ -1568,6 +1574,7 @@ namespace PHPSTORM_META {
'view' => \Illuminate\View\Factory::class,
'view.engine.resolver' => \Illuminate\View\Engines\EngineResolver::class,
'view.finder' => \Illuminate\View\FileViewFinder::class,
'zarinpal-gateway' => \App\Payment\Zarinpal::class,
'zibal-gateway' => \App\Payment\Zibal::class,
]));
override(\App::makeWith(0), map([
@ -1791,6 +1798,7 @@ namespace PHPSTORM_META {
'view' => \Illuminate\View\Factory::class,
'view.engine.resolver' => \Illuminate\View\Engines\EngineResolver::class,
'view.finder' => \Illuminate\View\FileViewFinder::class,
'zarinpal-gateway' => \App\Payment\Zarinpal::class,
'zibal-gateway' => \App\Payment\Zibal::class,
]));
override(\app(0), map([
@ -2014,6 +2022,7 @@ namespace PHPSTORM_META {
'view' => \Illuminate\View\Factory::class,
'view.engine.resolver' => \Illuminate\View\Engines\EngineResolver::class,
'view.finder' => \Illuminate\View\FileViewFinder::class,
'zarinpal-gateway' => \App\Payment\Zarinpal::class,
'zibal-gateway' => \App\Payment\Zibal::class,
]));
override(\resolve(0), map([
@ -2237,6 +2246,7 @@ namespace PHPSTORM_META {
'view' => \Illuminate\View\Factory::class,
'view.engine.resolver' => \Illuminate\View\Engines\EngineResolver::class,
'view.finder' => \Illuminate\View\FileViewFinder::class,
'zarinpal-gateway' => \App\Payment\Zarinpal::class,
'zibal-gateway' => \App\Payment\Zibal::class,
]));
override(\Psr\Container\ContainerInterface::get(0), map([
@ -2460,10 +2470,15 @@ namespace PHPSTORM_META {
'view' => \Illuminate\View\Factory::class,
'view.engine.resolver' => \Illuminate\View\Engines\EngineResolver::class,
'view.finder' => \Illuminate\View\FileViewFinder::class,
'zarinpal-gateway' => \App\Payment\Zarinpal::class,
'zibal-gateway' => \App\Payment\Zibal::class,
]));
override(\Illuminate\Foundation\Testing\Concerns\InteractsWithContainer::mock(0), map(["" => "@&\Mockery\MockInterface"]));
override(\Illuminate\Foundation\Testing\Concerns\InteractsWithContainer::partialMock(0), map(["" => "@&\Mockery\MockInterface"]));
override(\Illuminate\Foundation\Testing\Concerns\InteractsWithContainer::instance(0), type(1));
override(\Illuminate\Foundation\Testing\Concerns\InteractsWithContainer::spy(0), map(["" => "@&\Mockery\MockInterface"]));
override(\Illuminate\Support\Arr::add(0), type(0));
override(\Illuminate\Support\Arr::except(0), type(0));
override(\Illuminate\Support\Arr::first(0), elementType(0));

@ -21,11 +21,12 @@ class CustomerController extends Controller
public function createOrUpdate(Customer $customer, Request $request)
{
$credit = str_replace(',', '', $request->input('credit', 0));
$customer->name = $request->input('name');
$customer->address = $request->input('address');
// $customer->address_alt = $request->input('address_alt');
$customer->state = $request->input('state');
$customer->credit = str_replace(',','',$request->input('credit'));
$customer->credit = $credit == null ? 0 : $credit;
$customer->city = $request->input('city');
$customer->postal_code = $request->input('postal_code');
if ($request->has('email')) {

@ -51,6 +51,8 @@ use Spatie\MediaLibrary\MediaCollections\Models\Media;
* @method static \Illuminate\Database\Eloquent\Builder|Cat whereUpdatedAt($value)
* @method static \Illuminate\Database\Query\Builder|Cat withTrashed()
* @method static \Illuminate\Database\Query\Builder|Cat withoutTrashed()
* @property int $is_main
* @method static \Illuminate\Database\Eloquent\Builder|Cat whereIsMain($value)
* @mixin \Eloquent
*/
class Cat extends Model implements HasMedia

@ -31,9 +31,9 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @method static \Illuminate\Database\Eloquent\Builder|Credit whereUpdatedAt($value)
* @method static \Illuminate\Database\Query\Builder|Credit withTrashed()
* @method static \Illuminate\Database\Query\Builder|Credit withoutTrashed()
* @mixin \Eloquent
* @property-read \App\Models\Customer $customer
* @property-read \App\Models\Invoice $invoice
* @mixin \Eloquent
*/
class Credit extends Model
{

@ -43,7 +43,6 @@ use Illuminate\Notifications\Notifiable;
* @method static \Illuminate\Database\Eloquent\Builder|Customer whereRememberToken($value)
* @method static \Illuminate\Database\Eloquent\Builder|Customer whereState($value)
* @method static \Illuminate\Database\Eloquent\Builder|Customer whereUpdatedAt($value)
* @mixin \Eloquent
* @property string|null $code
* @method static \Illuminate\Database\Eloquent\Builder|Customer whereCode($value)
* @property string|null $address_alt
@ -70,6 +69,7 @@ use Illuminate\Notifications\Notifiable;
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Credit[] $credits
* @property-read int|null $credits_count
* @method static \Illuminate\Database\Eloquent\Builder|Customer whereCerdit($value)
* @mixin \Eloquent
*/
class Customer extends Authenticatable
{

@ -33,8 +33,8 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|Payment whereStatus($value)
* @method static \Illuminate\Database\Eloquent\Builder|Payment whereType($value)
* @method static \Illuminate\Database\Eloquent\Builder|Payment whereUpdatedAt($value)
* @mixin \Eloquent
* @property-read \App\Models\Invoice $invoice
* @mixin \Eloquent
*/
class Payment extends Model
{

@ -93,7 +93,6 @@ use function App\Helpers\getSetting;
* @method static \Illuminate\Database\Query\Builder|Product withTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|Product withoutTags($tagNames)
* @method static \Illuminate\Database\Query\Builder|Product withoutTrashed()
* @mixin \Eloquent
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Quantity[] $quantities
* @property-read int|null $quantities_count
* @property int $sell_count
@ -115,6 +114,9 @@ use function App\Helpers\getSetting;
* @method static \Illuminate\Database\Eloquent\Builder|Product whereFee($value)
* @property int $image_index
* @method static \Illuminate\Database\Eloquent\Builder|Product whereImageIndex($value)
* @property int $carat
* @method static \Illuminate\Database\Eloquent\Builder|Product whereCarat($value)
* @mixin \Eloquent
*/
class Product extends Model implements HasMedia
{

@ -46,9 +46,9 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @method static \Illuminate\Database\Eloquent\Builder|Prop whereWidth($value)
* @method static \Illuminate\Database\Query\Builder|Prop withTrashed()
* @method static \Illuminate\Database\Query\Builder|Prop withoutTrashed()
* @mixin \Eloquent
* @property string $unit
* @method static \Illuminate\Database\Eloquent\Builder|Prop whereUnit($value)
* @mixin \Eloquent
*/
class Prop extends Model
{

@ -25,7 +25,6 @@ use Plank\Metable\Metable;
* @method static \Illuminate\Database\Eloquent\Builder|Quantity wherePrice($value)
* @method static \Illuminate\Database\Eloquent\Builder|Quantity whereProductId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Quantity whereUpdatedAt($value)
* @mixin \Eloquent
* @property string|null $data
* @property-read \Illuminate\Database\Eloquent\Collection|\Plank\Metable\Meta[] $meta
* @property-read int|null $meta_count
@ -41,6 +40,12 @@ use Plank\Metable\Metable;
* @property int|null $image
* @method static \Illuminate\Database\Eloquent\Builder|Quantity whereImage($value)
* @property-read \App\Models\Product $product
* @property \Illuminate\Support\Carbon|null $deleted_at
* @method static \Illuminate\Database\Eloquent\Builder|Quantity onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|Quantity whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|Quantity withTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|Quantity withoutTrashed()
* @mixin \Eloquent
*/
class Quantity extends Model
{

@ -25,11 +25,11 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|Question whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Question whereProductId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Question whereUpdatedAt($value)
* @mixin \Eloquent
* @property int $status
* @property-read \App\Models\Customer $customer
* @property-read \App\Models\Product $product
* @method static \Illuminate\Database\Eloquent\Builder|Question whereStatus($value)
* @mixin \Eloquent
*/
class Question extends Model
{

@ -23,13 +23,13 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|Sms whereText($value)
* @method static \Illuminate\Database\Eloquent\Builder|Sms whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|Sms whereUser($value)
* @mixin \Eloquent
* @property string|null $code
* @method static \Illuminate\Database\Eloquent\Builder|Sms whereCode($value)
* @property string $ip
* @property string|null $mobile
* @method static \Illuminate\Database\Eloquent\Builder|Sms whereIp($value)
* @method static \Illuminate\Database\Eloquent\Builder|Sms whereMobile($value)
* @mixin \Eloquent
*/
class Sms extends Model
{

@ -29,10 +29,10 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|Ticket whereStatus($value)
* @method static \Illuminate\Database\Eloquent\Builder|Ticket whereTitle($value)
* @method static \Illuminate\Database\Eloquent\Builder|Ticket whereUpdatedAt($value)
* @mixin \Eloquent
* @property-read \App\Models\Customer $customer
* @property-read \Illuminate\Database\Eloquent\Collection|Ticket[] $subTickets
* @property-read int|null $sub_tickets_count
* @mixin \Eloquent
*/
class Ticket extends Model
{

@ -59,7 +59,7 @@
<input name="postal_code" type="postal_code"
class="form-control @error('postal_code') is-invalid @enderror"
placeholder="{{__('postal_code')}}"
value="{{old('Postal code',$customer->postal_code??null)}}"/>
value="{{old('postal_code',$customer->postal_code??null)}}"/>
</div>
</div>
<div class="col-md-5 mt-3">

Loading…
Cancel
Save