dimanche 5 août 2018

Laravel Exception of htmlspecialchars() expects parameter 1 to be string

In a Laravel 5.6 I am getting this exception:

htmlspecialchars() expects parameter 1 to be string, object given (View: /code/admin-adc/resources/views/transactions.blade.php)

In the Controller I have

public function transactions($id)
{
    $raw = Deal::whereId($id)->first();

    if($raw) {
        $deal = new DealsResource($raw);
    }
    return view('transactions', compact('deal'));
} // end function

In the view I have

<div class="padded__container">
    <transactions-view
        :current_user=""
        :dealdata=""></transactions-view>
</div>

In the view component I have

<script type="text/babel">
    export default {
        data() {
            return {
                deal: {}
            };
        },
        components: {},
        created() {
            this.deal = this.dealData;
        },
        props: ['current_user', 'dealData'],
        computed: {},
        methods: {},
        mounted() {}
    };
</script>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire