App\Http\Controllers\Laralum\CRUDController::dump PHP Method

dump() public method

public dump ( $name, $id )
    public function dump($name, $id)
    {
        Laralum::permissionToAccess('laralum.CRUD.access');
        # Check if table exists
        if (!Schema::hasTable($name)) {
            abort(404);
        }
        # Check if column exists
        if (!Schema::hasColumn($name, 'id')) {
            abort(404);
        }
        # Check if row exists
        if (!DB::table($name)->where('id', $id)->get()) {
            abort(404);
        }
        return dd(DB::table($name)->where('id', $id)->get());
    }