mardi 3 novembre 2015

Query withTrash, soft delete laravel

Basically I manage to get my soft delete working on my User table., problem is now my other pages would not work, I believe I need to make some changes using the withTrashed to the queries for the pages? For example the controller as shown below, how do I add the users column which have been soft deleted, can someone guide me and help me with this?

Controller.php

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\Zone;
use App\Parameter;

class DashboardController extends Controller
{
    public function index() {
        $zones = Zone::all();
        $parameters = Parameter::all();

        return view('dashboard', compact('zones', 'parameters'));
    }
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire