mercredi 30 janvier 2019

Laravel model object date value changed when print

I use Laravel framework and I have a strange issue, when I dump model object it return a true results for attributes:

@extends('frontend.includes.master')
@section('content')

<?php
dump($row); exit;
?>
<main class="main">
    <section class="banner banner--inner banner--short">
        <div class="container">

enter image description here

but when I dump or print the date value it give me a wrong result:

<?php
dump($row->start_date); exit;
?>

enter image description here

also this happen when I dump from view, but when I dump from controller it give me a true result:

$row = Forsah::with('company')->with('category')->with('region')->where('forsah.id', $id)->first();
        $data['row'] = $row;


        $data['user_forsah'] = false;
        if (Session::get('member_id')) {
            $user_forsah_row = UsersForsah::where('user_id', Session::get('member_id'))->where('forsah_id', $id)->first();
            if ($user_forsah_row) {
                $data['user_forsah'] = true;
            }
        }

        dump($row->start_date); exit;
        return view('frontend.forsah.show', $data);

enter image description here



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2Wuiw67
via IFTTT

Aucun commentaire:

Enregistrer un commentaire